2 Attachment(s)
Data type error when converting an old WinAPI C++ code as a new VS 2022 C++ project
Hi all.
I'm trying to write this code from an old WinAPI C++ book (code snippet Image at the bottom) into a new C++ project. What it does is create a clone process. But when i code it into VS 2022, I get the error:
Code:
"Argument of type "TCHAR *" is incompatible with parameter of type "char *" "
at line-17 (sprintf, 1st arg, below code). What's causing this please? And how to fix it?
Attachment 16512
VS 2022
Attachment 16513
VC 6.0