|
From: Louis G. <lg...@ya...> - 2003-02-23 16:34:47
|
Greets to List members:
Can anyone help me on this question:
There appears to be several C++ string classes that can be implemented
using the gcc compiler that comes with DevC++. Can anyone recommend a
string class that has many useful string manipulation methods ? Where can
I get a help help file or doc for the class methods ?
--- Ioannis Vranos <no...@ho...> wrote:
> -------Original Message-------
>
> From: Jeeun Cho
> Date: ÊõñéáêÞ, 23 ÖåâñïõÜñéïò 2003 9:25:06 ðì
> To: dev...@li...
> Subject: [Dev-C++] string and char
>
> hello..
> this is the part of my program..
> ===============================================
>
> for(int x=0;x<lengCom;x++)
> {
> comet[x]=nameCom.substr(fir,1);
> fir++;
> }
>
> ===============================================
> in this part, the array, comet is char, and im trying
> to store a single alphabet into comet array...but the
> problem is that it's not right to relate different
> datatype...
> how can i change string into char?
> (to make this part work?)
>
>
> #include <cstring>
>
> // ...
>
> char *c-style=new char[cppstring.size()+1];
>
>
> // Copies the string to a c-style string. string::c_str() returns a
> const
> char *.
> std::strcpy(c-style, cppstring.c_str());
>
>
> Ioannis Vranos
>
> * Programming pages: http://www.noicys.freeurl.com
> * Alternative URL: http://run.to/noicys
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
|