12 Mar
2004
12 Mar
'04
18:40
Am Sonntag, 15. Februar 2004 14:45 schrieb Gebhard Sieweke:
#include<string> #include <iostream> #include
void main () {
string a;
}
Wenn ich mit g++ Kompiliere kommt folgendes heraus:
g++ test.cpp
test.cpp:6: error: `main' must return `int' test.cpp: In function `int main(...)': test.cpp:8: error: `string' undeclared (first use this function)
Du hast vergessen den namespace anzugeben. Es muss heissen: int main() { std::string a; } Gruss Matthias