Jan 12, 2003 #1 Flappy Programmer Jul 30, 2002 35 AU I know I can use .c_str() to convert a string to a char array but what about the other way around?
Jan 12, 2003 #2 qednick Programmer Jul 26, 2002 516 US Hello again Flappy, you don't need a special function because there's an overloaded assignment operator for char* types. eg: [tt] char* str1 = "Hello World!"; string str2 = str1; // this is valid [/tt] programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek. Upvote 0 Downvote
Hello again Flappy, you don't need a special function because there's an overloaded assignment operator for char* types. eg: [tt] char* str1 = "Hello World!"; string str2 = str1; // this is valid [/tt] programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
Jan 12, 2003 Thread starter #3 Flappy Programmer Jul 30, 2002 35 AU I'm a doofus.. thanks for that... Upvote 0 Downvote