Borderou de evaluare (job #1201952)

Utilizator mikeshadowIon Complot mikeshadow Data 26 iunie 2014 15:13:02
Problema Prefixe Status done
Runda Arhiva ICPC Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void preproc()’: user.cpp:32:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<s.length(); i++) ^ user.cpp: In function ‘int main()’: user.cpp:46:26: error: invalid user-defined conversion from ‘std::ifstream {aka std::basic_ifstream<char>}’ to ‘FILE* {aka _IO_FILE*}’ [-fpermissive] fscanf(fin,"%s",s); ^ In file included from /usr/include/c++/4.8/ios:44:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/c++/4.8/bits/basic_ios.h:115:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match> operator void*() const ^ /usr/include/c++/4.8/bits/basic_ios.h:115:7: note: no known conversion for implicit ‘this’ parameter from ‘void*’ to ‘FILE* {aka _IO_FILE*}’ user.cpp:46:26: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>}’ through ‘...’ fscanf(fin,"%s",s); ^ user.cpp:46:26: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘std::string {aka std::basic_string<char>}’ [-Wformat=] user.cpp:49:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=0; i<s.length(); i++) ^ user.cpp:46:27: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin,"%s",s); ^

Ceva nu functioneaza?