|
-
Mar 14th, 2001, 06:05 PM
#1
Thread Starter
Junior Member
Hi
I would like to make more c++ apps but i cant find out how to make a string class close to vbs string class
the char[] arrary is to code consuming to be of any use in many different scenarios.
Is there a premade class that i just dont know of in the c++ librarys. And if soo what library and how do i use it.
-
Mar 14th, 2001, 11:24 PM
#2
If you want a library of strings and string functions, include "String.h"
-
Mar 15th, 2001, 04:08 AM
#3
Frenzied Member
It is not string.h but just string (it's a library)
Use it like this:
Code:
#include <string>
using namespace std;
int main()
{
string mystr; //declaration
mystr = "my";
mystr = mystr + "string";
printf(mystr.c_str ());
//prints mystring
//pretty much like VB
return 0;
}
-
Mar 15th, 2001, 06:27 PM
#4
Thread Starter
Junior Member
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
|