Problem helloworld
User usernamehere
Submission Time 2025-04-06 14:41:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

helloworld.cpp: In function ‘int main()’:
helloworld.cpp:17:6: error: ‘str’ was not declared in this scope; did you mean ‘std’?
17 | vec<str> v;
| ^~~
| std
helloworld.cpp:17:9: error: template argument 1 is invalid
17 | vec<str> v;
| ^
helloworld.cpp:17:9: error: template argument 2 is invalid
helloworld.cpp:18:4: error: request for member ‘push_back’ in ‘v’, which is of non-class type ‘int’
18 | v.push_back("Hello World");
| ^~~~~~~~~
helloworld.cpp:19:4: error: request for member ‘size’ in ‘v’, which is of non-class type ‘int’
19 | v.size();
| ^~~~
helloworld.cpp:20:13: error: invalid types ‘int[int]’ for array subscript
20 | cout << v[0];
| ^