|
From: Ken B. <ke...@al...> - 2003-02-24 15:24:22
|
I believe c_str() is what your looking for:
#include <iostream>
#include <string>
using namespace std;
void main()
#include <iostream>
#include <string>
using namespace std;
void main()
{
string b = "String";
const char* c;
c= b.c_str();
cout << c << endl;
}
btw, don't forget www.google.com, a simple search on:
C++ "string class" char
Ken Bradford
Alpha II Service, Inc.
(614)868-5033
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of Jeeun Cho
> Sent: Friday, February 21, 2003 11:13 PM
> To: dev...@li...
> Subject: [Dev-C++] string.h
>
>
> hello...
> actually i jst got dev c++ and..made a simple string
> program to test..
> in the program, i used apstring.h, but it didnt work..
> and after that, i used string.h, but that didnt work
> either.
> How can i make string work?
>
> thanks
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
> The most comprehensive and flexible code editor you can use.
> Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
> www.slickedit.com/sourceforge
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|