Problem greeting
User Alexis10
Submission Time 2023-11-08 11:04:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

greeting.cpp: In function ‘int main()’:
greeting.cpp:5:5: error: ‘string’ was not declared in this scope
5 | string a;
| ^~~~~~
greeting.cpp:2:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
1 | #include <stdio.h>
+++ |+#include <string>
2 | using namespace std;
greeting.cpp:6:14: error: ‘cin’ was not declared in this scope
6 | getline (cin , a);
| ^~~
greeting.cpp:2:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using namespace std;
greeting.cpp:6:20: error: ‘a’ was not declared in this scope
6 | getline (cin , a);
| ^
greeting.cpp:7:5: error: ‘cout’ was not declared in this scope
7 | cout << a << "ni hao xin nian kuai