Problem diamond
User LXYSGP
Submission Time 2024-06-17 20:11:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

diamond.cpp: In function ‘void print_diamond(int)’:
diamond.cpp:12:18: error: ‘cout’ is not a member of ‘std’
12 | std::cout << " ";
| ^~~~
diamond.cpp:1:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | void print_diamond(int n) {
diamond.cpp:16:18: error: ‘cout’ is not a member of ‘std’
16 | std::cout << "*";
| ^~~~
diamond.cpp:16:18: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
diamond.cpp:19:14: error: ‘cout’ is not a member of ‘std’
19 | std::cout << std::endl;
| ^~~~
diamond.cpp:19:14: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
diamond.cpp:19:27: error: ‘endl’ is not a member of ‘std’
19