|
-
July 7th, 1999, 04:39 AM
#1
Howto use basic_string ??
Hiya!
I found a template class called basic_string, but I don't know how to use it.
What headers must I include?
Thanks
Magnus
-
July 7th, 1999, 06:49 AM
#2
Re: Howto use basic_string ??
Hello,
I dont know but it must be the same than CString .
CString String;
CString String2 ( "Hello" );
CString String3 ( String2 );
String = _T( "Hello" );
CString String4;
String4 = String + String2;
...
Arnaud,
A++
Ps : The string is not a got class ( if you don't need to use unicode ), personaly i use char * with strcpy strcmp ... It's faster than CString.
-
July 7th, 1999, 07:32 AM
#3
Re: Howto use basic_string ??
First include <string> in your program. String class has many constructors and member functions the three most used are:
string();
string(const *str);
string(const &str);
the first creates an empty string object. The second creates a string object from a null-terminated string pointed to by str. The third creates a string from another string. String class supports several operators such as =,+,+= etc.
Roger L. McElfresh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|