Then the problem from the compiler itselff...
or I don't know..
it is realy confusable.//../
Then the problem from the compiler itselff...
or I don't know..
it is realy confusable.//../
C++
The best
.........
So should i re-instal visual c++?...
:*(
Hey, you gotta start somewhere
does anybody know how i can fix this problem?
Hey, you gotta start somewhere
See if you can make that code run. I haven't seen anyone including the std namespace when declaring string objects in this thread...Code:#include <iostream> #include <string> int main() { std::string str1; str1 = "Hello World!"; std::cout << str1; return 0; }
yes that works... but how come everyone else can get the code to work without using namespaces.
[edit]
And plus I never used to have to do that... weird... but thx... but that's still weird...
Hey, you gotta start somewhere
I don't know how others can do it without using accessing namespace. Maybe their compilers are old? I don't think older versions of standard include files (iostream.h, string.h, etc., but not the headers without ".h") defined the std namespace.
well dont feel to bad, i use VC++ 6.0 and i could never just use string.
example:
Code:#include <iostream.h> #include <string.h> int main() { string cat; // This never works char *cat; // thats what i end up useing. return 0; }