Problem | helloworld |
---|---|
User | senkyte |
Submission Time | 2024-02-05 09:25:41 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
helloworld.cpp:2:5: error: cannot declare ‘::main’ to be a global variable
2 | int main{
| ^~~~
helloworld.cpp:3:29: error: expected ‘}’ before ‘;’ token
3 | std::cout<<"Hello World \n";
| ^
helloworld.cpp:2:9: note: to match this ‘{’
2 | int main{
| ^
helloworld.cpp:3:11: error: invalid user-defined conversion from ‘std::basic_ostream<char>’ to ‘int’ [-fpermissive]
3 | std::cout<<"Hello World \n";
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/ios:44,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from helloworld.cpp:1:
/usr/include/c++/9/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>
117 |