Here's what I've got:
switch(argv[0])
{
case "-test1":
AfxBeginThread(method1, 0); break;
case "-test2":
AfxBeginThread(method2, 0); break;
case "-test3":
AfxBeginThread(method3, 0); break;
default:
AfxBeginThread(method1, 0); break;
}
I'm using windows so the arguments come into the array as TCHAR*'s. What do I need to do to make this work?
Edit:
So I'm trying to do the following now...
if(strcmp(argv[0], "-http") == 0)
doStuff();
I'm getting the following compile error
error C2664: 'strcmp' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast.
Help?