visual studio - compare argv[1][i] arrays C++ -
i need compare arrays in argument
can tell me why part of code wrong
{ for(int i=0;i<strlen(argv[3]);i++)     if(strcmp((argv[3][i]),"c")==0){         cout<<"c"<<endl;         return (0);     }   thanks.....
if(strcmp((argv[3][i]),"c")==0)   this line wrong.
argv[3][i] character, not string. want :
if(argv[3][i]=='c')      
Comments
Post a Comment