Problem hello
User hzy
Submission Time 2025-11-23 22:12:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hello.cpp: In function ‘int main()’:
hello.cpp:6:2: error: ‘cin’ was not declared in this scope
6 | cin >> i;
| ^~~
hello.cpp:2:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
1 | #include <string>
+++ |+#include <iostream>
2 |
hello.cpp:8:2: error: ‘cout’ was not declared in this scope
8 | cout << "Hello " << i << "!";
| ^~~~
hello.cpp:8:2: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?