Borderou de evaluare (job #2866017)

Utilizator RalucaioneteRalucaIonete Ralucaionete Data 9 martie 2022 12:11:42
Problema Muzeu Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void lee()': main.cpp:37:33: error: invalid types 'int[int]' for array subscript 37 | if(inmat(iv,jv) && d[iv][jv]==-1) | ^ main.cpp:39:18: error: invalid types 'int[int]' for array subscript 39 | d[iv][jv]=d[x][y]+1; | ^ main.cpp:39:28: error: invalid types 'int[int]' for array subscript 39 | d[iv][jv]=d[x][y]+1; | ^ main.cpp: In function 'int main()': main.cpp:52:13: error: no match for 'operator>>' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int*') 52 | fin >> (1+s[i]); | ~~~ ^~ ~~~~~~~~ | | | | | int* | std::ifstream {aka std::basic_ifstream<char>} In file included from /usr/include/c++/10/fstream:38, from main.cpp:2: /usr/include/c++/10/istream:168:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match) 168 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/10/istream:168:7: note: conversion of argument 1 would be ill-formed: main.cpp:52:18: error: cannot bind non-const lvalue reference of type 'bool&' to an rvalue of type 'bool' 52 | fin >> (1+s[i]); | ~~^~~~~~ In file included from /usr/include/c++/10/fstream:38, from main.cpp:2: /usr/include/c++/10/istream:172:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 172 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/10/istream:172:7: note: conversion of argument 1 would be ill-formed: main.cpp:52:18: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 52 | fin >> (1+s[i]); | ~~^~~~~~ | | | int* main.cpp:52:18: error: cannot bind rvalue '(short int)(((int*)(& s[i])) + 4)' to 'short int&' In file included from /usr/include/c++/10/fstream:38, from main.cpp:2: /usr/include/c++/10/istream:175:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match) 175 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/10/istream:175:7: note: conversion of argument 1 would be ill-formed: main.cpp:52:18: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 52 | fin >> (1+s[i]); | ~~^~~~~~ | | | int* main.cpp:52:18: error: cannot bind rvalue '(short unsigned int)(((int*)(& s[i])) + 4)' to 'short unsigned int&' Non zero exit status: 1

Ceva nu functioneaza?