
Originally Posted by
Salem
A couple of things.
1. In modern C++, you should use this in place of include <stdio.h>
#include <cstdio>
2. When dealing with anything TCHAR, you need to be aware of the "Generic-Text Routine Mappings"
_scprintf, _scprintf_l, _scwprintf, _scwprintf_l | Microsoft Learn
Back in VC6 days, TCHAR was just char, so it was easy to be lazy and use the ISO standard name for the function.
Thanks that helped. Sorry, been with C# for last the decade, I lost my touch with C++. Thought to relearn.
Anyways, when I did this, i got the error:
Code:
const variable "szCommandLine" requires an initializer
Code:
const char szCommandLine[MAX_PATH];
_scprintf(szCommandLine, "\"%s\" %d", szfilename, nCloneID);
And by the way, where can I find out how to properly call the old API functions (back in VC6 days) now in VS 2022? Maybe kinda like a guide for people who're returning to C++?, if there's such a thing.
Thanks