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
Post a Comment