Converting string into character arrays



 DEVELOP > c-Plus-Plus > Converting string into character arrays

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "kittykat"
Date: 01 Dec 2004 04:52:23 PM
Object: Converting string into character arrays
Hi,
I was just wondering how can I convert a String into a char array?
Your help would be greatly appreciated,
Thanx in advance.
.

User: "Howard"

Title: Re: Converting string into character arrays 01 Dec 2004 04:57:44 PM
"kittykat" <f_arikat@nospam.hotmail.com> wrote in message
news:485cae2009f3f0c4990dfc0e611055fc@localhost.talkaboutprogramming.com...

Hi,
I was just wondering how can I convert a String into a char array?

Your help would be greatly appreciated,
Thanx in advance.

That depends: what's a "String"? If you mean the class called "string",
first notice that it is spelled with a lower case "s", which is very
important in C++. And in that case, you can call the c_str() function in
the string class to get a pointer to the character array, from which you are
free to copy to your own char array if you need. If you mean some other,
third-party class called "String", then you'd be best off asking the
creators of that class, or reading their manual.
-Howard
.
User: "kittykat"

Title: Re: Converting string into character arrays 01 Dec 2004 05:29:59 PM
Thank you!
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER