How to compare a parameter string Visual C++ -


i want simple: check parameter is.

void _tmain(int argc, wchar *argv[]) {    if(argv[4] == "-h"); {          //do stuff }   } 

i getting incompatible error wchar * const char *.

such conversion question has been asked, answers have found many , not simple. total newbie @ c++.

what looking not pointers complicated functions, rather actual code put program make work.

just looking simple, straightforward, working code. thanks!

#include <string.h> void _tmain(int argc, wchar *argv[]) {       if( 0 == wcscmp(argv[4], l"-h") )    {          //do stuff    }   } 

that should it.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -