I mean:

The code you supplied has a main statement that looks like this:

int _tmain(int argc, _TCHAR* argv[])
{
...
}

Now I want to add stuff to the code to do something with argv[2]. For example, convert it to an integer so I can use it in a switch statement. So in my code I go like this:

if (argc <2)
{
_tprintf(_T("Wrong number of arguments.\n\n"));
return 0;
}

int nTempSuspendType;
nTempSuspendType = atoi(argv[2]);
switch (nTempSuspendType)
...

And that's when I start getting all the type errors, right around the atoi statement. I have been scouring the internet for ways to handle the type conversion, I've found about a dozen different ways, tried them all, and they all either produce the same errors, or they cause the program to crash into the debugger when I run it.

If I change the main statement to this:
int main(int argc, char* argv[])
{
...
}

Then everything I do makes the program crash into the debugger.
_________________________
Tony Fabris