|
|
back to boardCommon BoardVery Unclear: С++, string Quoting from FAQ: (C++)Чтобы считать строки: string line; while (getline(cin, line)) { ... } Quoting from reply to email after compilation error: ab3282a0-122f-4786-b6ac-350db0fd59d9(15): error: identifier "string" is undefined string te; ^ By the way I tried to include string or string.h headers - no matter. So where is the truth?? Re: Very Unclear: С++, string May be you forgot to add "using namespace std" Re: Very Unclear: С++, string Ok, tried, got CE, but in addition: 576f34f4-c336-4262-9fca-d2ba8775464b(2): error: name must be a namespace name using namespace std; ^ Re: Very Unclear: С++, string Does this code got CE on C++? #include <string> using namespace std; int main() { return 0; } Re: Very Unclear: С++, string It seems I found the problem. If I write like this: #include <string> #include <iostream.h> using namespace std; int main() { return 0; } I get CE. But if it's like this: #include <string> #include <iostream> using namespace std; int main() { return 0; } All works properly. Thanks for help. |
|
|