Problem helloworld
User manfacenathan
Submission Time 2026-05-26 16:14:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

helloworld.cpp: In function ‘int main()’:
helloworld.cpp:3:2: error: ‘string’ was not declared in this scope
3 | string a = "Hello World";
| ^~~~~~
helloworld.cpp:1:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
+++ |+#include <string>
1 | using namespace std;
helloworld.cpp:4:2: error: ‘cout’ was not declared in this scope
4 | cout << a
| ^~~~
helloworld.cpp:1:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | using namespace std;
helloworld.cpp:4:10: error: ‘a’ was not declared in this scope
4 | cout << a
| ^