QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#768261#9227. Henry the Plumberucup-team1206Compile Error//C++201.5kb2024-11-21 07:37:582024-11-21 07:37:59

Details

answer.code: In function ‘void prtints(auto:55& ...)’:
answer.code:16:52: error: expected ‘;’ before ‘}’ token
   16 | void prtints(auto& ...ints) { (printf("%d", ints) )}
      |                                                    ^
      |                                                    ;
answer.code:16:38: error: parameter packs not expanded with ‘...’:
   16 | void prtints(auto& ...ints) { (printf("%d", ints) )}
      |                               ~~~~~~~^~~~~~~~~~~~~~
answer.code:16:38: note:         ‘ints’
answer.code: In function ‘void ints(auto:54& ...) [with auto:54 = {int, int, int}]’:
answer.code:15:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 | void ints(auto& ...ints) { (scanf("%d", &ints), ...); }
      |                             ~~~~~^~~~~~~~~~~~~
answer.code:15:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
answer.code:15:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
answer.code: In function ‘void ints(auto:54& ...) [with auto:54 = {int, int}]’:
answer.code:15:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
answer.code:15:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
answer.code: In function ‘int main()’:
answer.code:56:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   56 |   scanf("%d", &n);
      |   ~~~~~^~~~~~~~~~