cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Converting char[] to string
Converting char[] to string
Jun 18, 2008 at 5:18pm UTC
cjzheng
(5)
What would be the best way to convert char[] to string?
Thanks in advance.
Jun 18, 2008 at 6:38pm UTC
Zaita
(2770)
1
2
char
mychar[] =
"bob"
; string mystring = string(mychar);
:)
Topic archived. No new replies allowed.