Problem diamond
User Denzio321
Submission Time 2023-02-01 20:42:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

diamond.cpp: In function ‘std::string get_line(int, int)’:
diamond.cpp:8:11: error: ‘n’ was not declared in this scope
8 | if(i == n-1){
| ^
diamond.cpp:10:16: error: invalid conversion from ‘const char*’ to ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} [-fpermissive]
10 | print[i] = "*";
| ^~~
| |
| const char*
diamond.cpp:11:8: error: expected ‘;’ before ‘}’ token
11 | i++
| ^
| ;
12 | }
| ~
diamond.cpp:15:15: error: invalid conversion from ‘const char*’ to ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} [-fpermissive]
15 | print[i] = " ";
| ^~~
| |
| const char*
diamond.cpp: In function ‘int main()’:
diamond.cpp:42:7: error: