Problem nycheer
User personjs
Submission Time 2025-01-16 16:33:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nycheer.cpp: In function ‘int main()’:
nycheer.cpp:6:14: error: expected identifier before numeric constant
6 | std::string[4] thing = {"", "Hey", "Ho", "Nanyang"};
| ^
nycheer.cpp:6:14: error: expected ‘]’ before numeric constant
6 | std::string[4] thing = {"", "Hey", "Ho", "Nanyang"};
| ^
| ]
nycheer.cpp:6:13: error: structured binding declaration cannot have type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
6 | std::string[4] thing = {"", "Hey", "Ho", "Nanyang"};
| ^
nycheer.cpp:6:13: note: type must be cv-qualified ‘auto’ or reference to cv-qualified ‘auto’
nycheer.cpp:6:13: error: empty structured binding declaration
nycheer.cpp:6:17: error: expected initializer before ‘thing’
6 | std::string[4] thing = {"", "Hey", "Ho", "Nanyang"};
| ^~~~~
nycheer.cpp:8:19: error: ‘thing’ was not declared in this scope