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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -