Hi,
when I choose the first choice in this program, "1"
it will come up with nothing. If I put in the second choice "2" it gives the defonition. How can i get it so It will do all choices, not just number 2. Thanks
#include <iostream>
#include <stdlib.h>
#include <string.h>
#define maxWord 1
int main(int argc, char *argv[])
{
char* word[2];
char* def[2];
char* tmp;
char test;
word [1] = "1";
def [1] = "ab";
word [1] = "2";
def [1] = "abc";
cout << "Enter 1 or 2: ";
cin >> tmp;
for (int i = 1; i <= maxWord; i++)
{
if(strcmp(tmp, word[i]) == 0)
cout << def[i];
}
test:
goto test;
system("PAUSE");
return 0;
}