G
George
Hello to everybody.....
I saw in my new book (C++ for Dummies, 7 Books in 1, by Jeff Cogswell-2002)
the following code (wich compiles perfectly with the Dev-C++ compiler
included in the books CD-Rom):
#include <iostream>
#include <stdlib.h>
#include <string>
int main()
{
string mystring;
mystring="Hello...";
cout << mystring << endl;
system("PAUSE");
return 0;
}
After a little search i figured out what
the 3rd include line talks about....(Standard Template Library).
But when i tried to compile this code with my
Borland C++ Compiler 5.5.1 i got a lot of errors (as i expected).
Does'nt my compiler know anything about the STL ???
Is it safe and portable to write such programms?
I spended months of learning anything about manipulating
"strings" in c/c++ using pointers and all this stuff.
I did'nt know that there was something so simple......
I'm realy confused about what is "clean" C++ and whats not....
Can anybody help or guide me.......
Many thanks in advance,
George.
I saw in my new book (C++ for Dummies, 7 Books in 1, by Jeff Cogswell-2002)
the following code (wich compiles perfectly with the Dev-C++ compiler
included in the books CD-Rom):
#include <iostream>
#include <stdlib.h>
#include <string>
int main()
{
string mystring;
mystring="Hello...";
cout << mystring << endl;
system("PAUSE");
return 0;
}
After a little search i figured out what
the 3rd include line talks about....(Standard Template Library).
But when i tried to compile this code with my
Borland C++ Compiler 5.5.1 i got a lot of errors (as i expected).
Does'nt my compiler know anything about the STL ???
Is it safe and portable to write such programms?
I spended months of learning anything about manipulating
"strings" in c/c++ using pointers and all this stuff.
I did'nt know that there was something so simple......
I'm realy confused about what is "clean" C++ and whats not....
Can anybody help or guide me.......
Many thanks in advance,
George.