Why this program shows error?
#include <iostream> int counter=50; int main() { register int counter; for(counter=1;counter<10;counter++){ cout<<endl<<::counter/counter; } return 0; } main.cpp:15:5: error: âcoutâ was not declared in this scope cout<<endl<<::counter/counter; ^~~~ main.cpp:15:5: note: suggested alternative: In file included from main.cpp:9:0: /usr/include/c++/6/iostream:61:18: note: âstd::coutâ extern ostream cout; /// Linked to standard output ^~~~ main.cpp:15:11: error: âendlâ was not declared in this scope cout<<endl<<::counter/counter; ^~~~ main.cpp:15:11: note: suggested alternative: In file included from /usr/include/c++/6/iostream:39:0, from main.cpp:9: /usr/include/c++/6/ostream:590:5: note: âstd::endlâ endl(basic_ostream<_CharT, _Traits>& __os) ^~~~