Problem goodbye
User Peterfile
Submission Time 2025-07-02 16:27:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

goodbye.cpp: In function ‘int main()’:
goodbye.cpp:2:10: error: ‘string’ is not a member of ‘std’
2 | std::string S;
| ^~~~~~
goodbye.cpp:1:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
+++ |+#include <string>
1 | int main() {
goodbye.cpp:3:10: error: ‘cin’ is not a member of ‘std’
3 | std::cin >> S;
| ^~~
goodbye.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | int main() {
goodbye.cpp:3:17: error: ‘S’ was not declared in this scope
3 | std::cin >> S;
| ^
goodbye.cpp:4:10: error: ‘cout’ is not a member of ‘std’
4 | std::cout << "Goodbye " << S << "!" << std::endl;
| ^~~~
goodbye.cpp:4:10: note: ‘std::cout’ is defined in