How to convert a char array to string using c++.net 2008?

How to convert a char array to string using c++.net 2008?

char str[256];
xuanspiderAsked:
Who is Participating?
 
alb66Connect With a Mentor Commented:
For greater details give a look at
http://msdn.microsoft.com/en-us/library/7b620dhe.aspx
0
 
alb66Commented:
char buffer[100];
String^ str;

str = Marshal::PtrToStringAnsi( (IntPtr)buffer );
0
 
xuanspiderAuthor Commented:
Good
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.