Borderou de evaluare (job #2561892)
Utilizator | Data | 29 februarie 2020 11:00:21 | |
---|---|---|---|
Problema | Eq4 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:13:18: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[100005]' [-Wformat=]
scanf("%s",&a);
^
main.cpp:18:17: warning: comparison with string literal results in unspecified behavior [-Waddress]
while(a[i]!="\n")
^~~~
main.cpp:18:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:20:18: warning: comparison with string literal results in unspecified behavior [-Waddress]
if(a[i]=="-")
^~~
main.cpp:20:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:22:18: warning: comparison with string literal results in unspecified behavior [-Waddress]
if(a[i]=="+")
^~~
main.cpp:22:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:24:18: warning: comparison with string literal results in unspecified behavior [-Waddress]
if(a[i]>="0" && a[i]<="9")
^~~
main.cpp:24:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:24:31: warning: comparison with string literal results in unspecified behavior [-Waddress]
if(a[i]>="0" && a[i]<="9")
^~~
main.cpp:24:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:26:13: error: 'nr' was not declared in this scope
nr=0;
^~
main.cpp:27:25: warning: comparison with string literal results in unspecified behavior [-Waddress]
while(a[i]>="0" && a[i]<="9")
^~~
main.cpp:27:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:27:38: warning: comparison with string literal results in unspecified behavior [-Waddress]
while(a[i]>="0" && a[i]<="9")
^~~
main.cpp:27:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
main.cpp:10:32: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("eq4.in","r",stdin);
^
main.cpp:11:34: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("eq4.out","w",stdout);
^
main.cpp:12:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&c);
^
main.cpp:13:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",&a);
^
main.cpp:14:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&st,&dr,&rest);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !