int _tmain(int argc, char* argv)
printf("drive name: %s\n", argv);
It displays only the first character of the first argument on the command line.
So what's wrong with my reference to argv?
The original declaration was _TCHAR* argv, which declares argv as pointer to strings of wide chars (wchar_t).
And sure enough, when I revert to that declaration, printf("%ls",argv) displays the entire strings. Note the use of "%ls" instead of "%s".
So I guess my question is: how can I coerce VC++ to pass normal chars (char* argv) instead of wide chars?
Probably some kind of build option. If that is the case, I would appreciate click-by-click instructions. I'm a little rusty with using VC++.