declare array e.g
char a[]={'1','2','3','x','y'};
there is no other functions to do it ansi C.
u have to put it in an array. then its a string.
In c++, how do I convert a variable of char* type to Std::string type.?
Yes there's a constructor that takes const char* for basic_string. std::string%26lt;char%26gt;.
PS: mac, again, you have no idea what you're talking about!!! ANSI C??? Please do not answer what you don't have a clue about.
Reply:Is there not a contructor for Std::string that takes a char*?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment