foo.cpp:2:7: error: expected nested-name-specifier before 'spacename'
using spacename std;
^
foo.cpp: In function 'int main()':
foo.cpp:6:5: error: 'cin' was not declared in this scope
cin >>x>>y;
^
foo.cpp:6:5: note: suggested alternative:
In file included from foo.cpp:1:0:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
foo.cpp:8:5: error: 'cout' was not declared in this scope
cout <<"sum="<<sum<<endl;
^
foo.cpp:8:5: note: suggested alternative:
In file included from foo.cpp:1:0:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
foo.cpp:8:25: error: 'endl' was not declared in this scope
cout <<"sum="<<sum<<endl;
^
foo.cpp:8:25: note: suggested alternative:
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39:0,
from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:564:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^