-
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.
-
If you want a library of strings and string functions, include "String.h"
-
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;
}
-