Problem helloworld
User chikin
Submission Time 2025-06-16 14:38:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

helloworld.cpp: In function ‘int main()’:
helloworld.cpp:5:13: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
5 | int a = "Hello";
| ^~~~~~~
| |
| const char*
helloworld.cpp:6:13: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
6 | int b = "World";
| ^~~~~~~
| |
| const char*
helloworld.cpp:7:10: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
7 | cout >> a >> " " >> b;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
helloworld.cpp:7:10: note: candidate: ‘operator>>(int, int)’ <built-in>
7 | cout >> a >> " " >> b;
| ~~~~~^~~~
helloworld