I am trying to pass char* to Console.WriteLine() and I get the following error.
error C2665: 'System::Console::WriteLine' : none of the 19 overloads could convert all the argument types
How can I get around the problem? I am using Visual C++ in
I am trying to pass char* to Console.WriteLine() and I get the following error.
error C2665: 'System::Console::WriteLine' : none of the 19 overloads could convert all the argument types
How can I get around the problem? I am using Visual C++ in
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Mar 16, 2008, 11:47 AM EDT
Try something like this:
char
*myString = "Hello World"; // or whateverConsole::WriteLine(
gcnew String(myString));