T
tonyjeffs2
//int _tmain(int argc, _TCHAR* argv[]) // main for windows
int main(int argc, char *argv[]) // ... or main
{
cout <<argv[0]<<endl;
return 0;
}
//run at command line: test.exe cat dog
With main the output is "test.exe" which I'd expect,
but a similar program using _ tmain outputs a number which I think is
the address of the 't' in test.exe. What is the logic behind this -
what's happening?
Thanks
Tony
int main(int argc, char *argv[]) // ... or main
{
cout <<argv[0]<<endl;
return 0;
}
//run at command line: test.exe cat dog
With main the output is "test.exe" which I'd expect,
but a similar program using _ tmain outputs a number which I think is
the address of the 't' in test.exe. What is the logic behind this -
what's happening?
Thanks
Tony