QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#874218#1138. Counting MushroomsasdfghjklCompile Error//C++14931b2025-01-27 20:56:332025-01-27 20:56:34

詳細信息

answer.code: In function ‘int main()’:
answer.code:35:23: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   35 |                 system("make");
      |                 ~~~~~~^~~~~~~~
answer.code:36:23: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   36 |                 system("g++ grader.cpp mushroom.cpp -o mushroom -std=c++11");
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:37:23: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   37 |                 system("mushroom");
      |                 ~~~~~~^~~~~~~~~~~~
/usr/bin/ld: /tmp/cc3cVoUx.o: in function `main':
answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/cceam24D.o:implementer.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cceam24D.o: in function `main':
implementer.cpp:(.text.startup+0x65): undefined reference to `count_mushrooms(int)'
collect2: error: ld returned 1 exit status