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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Mar 16, 2008, 3:47 PM
Try something like this:
char
*myString = "Hello World"; // or whateverConsole::WriteLine(
gcnew String(myString));