Problem givingtree
User King6767
Submission Time 2026-06-23 10:35:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

givingtree.cpp: In function ‘void printRectangleRow(int, int, int, int, bool)’:
givingtree.cpp:6:10: error: ‘cout’ is not a member of ‘std’
6 | std::cout << std::string(spaces, ' ');
| ^~~~
givingtree.cpp:2:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
1 | #include <string>
+++ |+#include <iostream>
2 |
givingtree.cpp:10:18: error: ‘cout’ is not a member of ‘std’
10 | std::cout << "T\n";
| ^~~~
givingtree.cpp:10:18: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
givingtree.cpp:12:18: error: ‘cout’ is not a member of ‘std’
12 | std::cout << 'T' << std::string(width - 2, ' ') << "T\n";
| ^~~~
givingtree.cpp:12:18: note: ‘std::cout’ is defined in header ‘<iostream>’; di