Solved. Basically the solution, 1 post below, was not including <*.h> and <*>
My code:
wrote: | |
|
Sorry im so noobish... But how to solve this problem? It says:
C:\Documents and Settings\JiangLiu\My Documents\jerryc\Newlife.cpp(12) : error C2146: syntax error : missing ';' before identifier 'str'
C:\Documents and Settings\JiangLiu\My Documents\jerryc\Newlife.cpp(12) : error C2501: 'string' : missing storage-class or type specifiers
C:\Documents and Settings\JiangLiu\My Documents\jerryc\Newlife.cpp(12) : fatal error C1004: unexpected end of file found
When I add
using namespace std;
it gives a
C:\Documents and Settings\JiangLiu\My Documents\jerryc\Newlife.cpp(20) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
' (or there is no acceptable conversion)
message.
This is quite an important personal project, so I'd appreciate some fast responses.