Borderou de evaluare (job #1048541)
Utilizator | Data | 6 decembrie 2013 00:16:30 | |
---|---|---|---|
Problema | Secventa | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:11:18: error: ‘char rand [5000000]’ redeclared as different kind of symbol
char rand[5000000] ;
^
In file included from /usr/local/include/c++/4.8.0/cstdlib:72:0,
from /usr/local/include/c++/4.8.0/ext/string_conversions.h:41,
from /usr/local/include/c++/4.8.0/bits/basic_string.h:2817,
from /usr/local/include/c++/4.8.0/string:52,
from /usr/local/include/c++/4.8.0/bits/locale_classes.h:40,
from /usr/local/include/c++/4.8.0/bits/ios_base.h:41,
from /usr/local/include/c++/4.8.0/ios:42,
from /usr/local/include/c++/4.8.0/istream:38,
from /usr/local/include/c++/4.8.0/fstream:38,
from user.cpp:1:
/usr/include/stdlib.h:380:12: error: previous declaration of ‘int rand()’
extern int rand (void) __THROW;
^
user.cpp: In function ‘int main()’:
user.cpp:19:33: error: cannot convert ‘int (*)()throw ()’ to ‘char*’ for argument ‘1’ to ‘char* fgets(char*, int, FILE*)’
fgets( rand , 5000000 , fin ) ;
^
user.cpp:23:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for ( i = 1 ; rand[i] != 0 ; i ++ )
^
user.cpp:25:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if ( rand[i] == '-' )
^
user.cpp:25:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if ( rand[i] == '-' )
^
user.cpp:29:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
else if ( rand[i] >= '0' && rand[i] <= '9' )
^
user.cpp:29:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
else if ( rand[i] >= '0' && rand[i] <= '9' )
^
user.cpp:29:43: warning: pointer to a function used in arithmetic [-Wpointer-arith]
else if ( rand[i] >= '0' && rand[i] <= '9' )
^
user.cpp:29:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
else if ( rand[i] >= '0' && rand[i] <= '9' )
^
user.cpp:31:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
numar = numar * 10 + ( rand[i] - '0' ) ;
^
user.cpp:31:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
numar = numar * 10 + ( rand[i] - '0' ) ;
^
user.cpp:31:50: warning: pointer to a function used in arithmetic [-Wpointer-arith]
numar = numar * 10 + ( rand[i] - '0' ) ;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !