468,512 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

How to convert a string to and char array

9
Hi,
Can anyone plz tell me how to do this conversion:

I have a string array str[10];
str[0],str[1],.....str[9] are all having strings.

I just want to convert one string, say str[0], to characters!!!!

I would appreciate your responses!
Thanks,
Asad/
Oct 3 '06 #1
2 3289
D_C
293 100+
If you are using the STL string, there is a method c_str(). Then, you could just call ((str[0]).c_str()).
Oct 3 '06 #2
Asad
9
If you are using the STL string, there is a method c_str(). Then, you could just call ((str[0]).c_str()).
Thanks,
I got the conversion.

-Asad.
Oct 3 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by IamZadok | last post: by
13 posts views Thread by Bryan Parkoff | last post: by
15 posts views Thread by Kueishiong Tu | last post: by
6 posts views Thread by Allan Ebdrup | last post: by
2 posts views Thread by Steve Kershaw | last post: by
8 posts views Thread by Frank Liebelt | last post: by
12 posts views Thread by Peter | last post: by
14 posts views Thread by rtillmore | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.