Borderou de evaluare (job #2562104)

Utilizator BerciBercean Ioan Berci Data 29 februarie 2020 12:18:00
Problema Traseu4 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:6:13: warning: character constant too long for its type ifstream in('traseu.in'); ^~~~~~~~~~~ main.cpp:7:14: warning: character constant too long for its type ofstream out('traseu.out'); ^~~~~~~~~~~~ main.cpp:6:24: error: invalid conversion from 'int' to 'const char*' [-fpermissive] ifstream in('traseu.in'); ^ In file included from main.cpp:1:0: /usr/include/c++/6/fstream:495:7: note: initializing argument 1 of 'std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]' basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) ^~~~~~~~~~~~~~ main.cpp:7:26: error: invalid conversion from 'int' to 'const char*' [-fpermissive] ofstream out('traseu.out'); ^ In file included from main.cpp:1:0: /usr/include/c++/6/fstream:697:7: note: initializing argument 1 of 'std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]' basic_ofstream(const char* __s, ^~~~~~~~~~~~~~ main.cpp:12:23: error: 'm' has not been declared int getDist(int value,m,nint i,int j,int currentLength,int maxLength) { ^ main.cpp:12:25: error: 'nint' has not been declared int getDist(int value,m,nint i,int j,int currentLength,int maxLength) { ^~~~ main.cpp: In function 'int getDist(int, int, int, int, int, int)': main.cpp:13:14: error: 'n' was not declared in this scope if( i >= n || j > m){ ^ main.cpp:13:23: error: 'm' was not declared in this scope if( i >= n || j > m){ ^ main.cpp:23:65: error: too few arguments to function 'int getDist(int, int, int, int, int, int)' return std::max(getDist(value,i+1,j,currentLength+1,maxLength),getDist(value,i,j+1,currentLength+1,maxLength)) ^ main.cpp:12:5: note: declared here int getDist(int value,m,nint i,int j,int currentLength,int maxLength) { ^~~~~~~ main.cpp:23:112: error: too few arguments to function 'int getDist(int, int, int, int, int, int)' return std::max(getDist(value,i+1,j,currentLength+1,maxLength),getDist(value,i,j+1,currentLength+1,maxLength)) ^ main.cpp:12:5: note: declared here int getDist(int value,m,nint i,int j,int currentLength,int maxLength) { ^~~~~~~ main.cpp:24:1: error: expected ';' before '}' token } ^ main.cpp: In function 'int main()': main.cpp:38:51: error: too many arguments to function 'int getDist(int, int, int, int, int, int)' Non zero exit status: 1

Ceva nu functioneaza?