F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39387995_21584.cpp: In function 'int main()':
0_0_39387995_21584.cpp:7:22: error: too few arguments to function 'char* gets_s(char*, rsize_t)'
    7 |         while (gets_s(a), strcmp(a, "#") != 0)
      |                ~~~~~~^~~
In file included from gcc-13.1.0/x86_64-w64-mingw32/include/stdio.h:1641,
                 from 0_0_39387995_21584.cpp:1:
gcc-13.1.0/x86_64-w64-mingw32/include/sec_api/stdio_s.h:571:25: note: declared here
  571 |   _CRTIMP char* __cdecl gets_s(char*,rsize_t);
      |                         ^~~~~~
0_0_39387995_21584.cpp:7:27: error: 'strcmp' was not declared in this scope
    7 |         while (gets_s(a), strcmp(a, "#") != 0)
      |                           ^~~~~~
0_0_39387995_21584.cpp:3:1: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    2 | #include<string>
  +++ |+#include <cstring>
    3 | int main()
0_0_39387995_21584.cpp:10:21: error: 'strlen' was not declared in this scope
   10 |                 l = strlen(a);
      |                     ^~~~~~
0_0_39387995_21584.cpp:10:21: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-07-06 02:19:09, Gzip enabled