Problem | greeting |
---|---|
User | cobnet |
Submission Time | 2024-02-28 16:54:27 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
greeting.cpp: In function ‘int main()’:
greeting.cpp:4:22: error: cannot convert ‘std::__cxx11::basic_string<char>’ to ‘const char*’
4 | printf(NIANNIANYOUYU + " xin nian kuai le!")}
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/c++/9/ext/string_conversions.h:43,
from /usr/include/c++/9/bits/basic_string.h:6496,
from /usr/include/c++/9/string:55,
from greeting.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:105:32: note: initializing argument 1 of ‘int printf(const char*, ...)’
105 | printf (const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~