gets not working
why gets() is not working ?
here's the function code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
int searchStr(char **Str, int &size)
{
char word[15];
cout<<"enter the word to search: ";
gets(word);
char wantedWord[15];
strcpy(wantedWord,"yoni");
for(int x=0; x<size; x++)
{
if(strcmp(Str[x],wantedWord))
return 1;
else
return 0;
}
}
|
Last edited on
Topic archived. No new replies allowed.