I`m new in this forum , and I`m an absolute beginer in C++ language.
Therefor i already have some major problems in my learning.
My compiler is giving me odd errors eventhough the codes are typed in corectly , exactly as in the book.
Here are some of the errors:
1>.\lines.cpp(3) : error C2146: syntax error : missing ';' before identifier 'std'
1>.\lines.cpp(3) : error C2873: 'namepsace' : symbol cannot be used in a using-declaration
1>.\lines.cpp(3) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\lines.cpp(3) : error C2365: 'std' : redefinition; previous definition was 'namespace'
1>.\lines.cpp(7) : error C2065: 'cout' : undeclared identifier
1>.\lines.cpp(8) : error C2065: 'cout' : undeclared identifier
1>.\lines.cpp(9) : error C2065: 'cout' : undeclared identifier
1>.\lines.cpp(10) : error C2065: 'cin' : undeclared identifier
1>.\lines.cpp(10) : error C2228: left of '.get' must have class/struct/union
1> type is ''unknown-type''
I can`t understand aything because in my books says that everething is corect and I`m totally confused.Please help me.
Jump to Post
Since you didn't post any code I can only guess that you failed to include header files and identify the namespace.
#include <iostream> using namespace std; ... ... /blabla
All 7 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.