How do you use/declare strings.
I have #include <string.h> is that the one I need? I tried declaring my string as:
string myString;
didn't work. :D
NOMAD
Printable View
How do you use/declare strings.
I have #include <string.h> is that the one I need? I tried declaring my string as:
string myString;
didn't work. :D
NOMAD
orCode:#include <string>
...
std::string myString;
Z.Code:#include <string>
using namespace std;
...
string myString;
i bought a book it has an example like this:
#include <iostream>
#include <cstring>
using namespace std;
char str1[], str2[], strout[];
int main()
{
str1 = 'ABC';
str2 = 'def';
strout = str1 + str2;
cout << strout;
return 0;
}
you mean it will not work in vc++ 6.0?
and explain me please why I get errors on the above code