/in/foo.cc:3:5: error: cannot declare '::main' to be a global variable
int main{
^~~~
/in/foo.cc:4:30: error: expected '}' before ';' token
cout<<"Hello World"<<endl;
^
/in/foo.cc:4:24: error: invalid user-defined conversion from 'std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}' to 'int' [-fpermissive]
cout<<"Hello World"<<endl;
~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/6/ios:44:0,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/basic_ios.h:117:16: note: candidate is: std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
explicit operator bool() const
^~~~~~~~
/usr/include/c++/6/bits/basic_ios.h:117:16: note: return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion
/in/foo.cc:5:5: error: expected unqualified-id before 'return'
return 0;
^~~~~~
/in/foo.cc:6:1: error: expected declaration before '}' token
}
^