Borderou de evaluare (job #3138752)

Utilizator AnSeDraAndrei Sebastian Dragulescu AnSeDra Data 21 iunie 2023 21:12:45
Problema Base3 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:18:1: error: 'priority_queue' does not name a type 18 | priority_queue <el> Q; | ^~~~~~~~~~~~~~ main.cpp: In function 'void Dijkstra()': main.cpp:23:12: error: 'Q' was not declared in this scope 23 | while(!Q.empty()) | ^ main.cpp: In function 'int main()': main.cpp:50:12: error: no match for 'operator>>' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'char*') 50 | cin>>(s+1); l=strlen(s+1); | ~~~^~~~~~~ | | | | | char* | std::ifstream {aka std::basic_ifstream<char>} In file included from /usr/include/c++/12.2.1/fstream:38, from main.cpp:1: /usr/include/c++/12.2.1/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>; __istream_type = std::basic_istream<char>]' (near match) 168 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/12.2.1/istream:168:7: note: conversion of argument 1 would be ill-formed: main.cpp:50:16: warning: comparing the result of pointer addition '(((char*)(& s)) + 1)' and NULL [-Waddress] 50 | cin>>(s+1); l=strlen(s+1); | ~~^~~ main.cpp:50:16: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'char*' /usr/include/c++/12.2.1/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++/12.2.1/istream:172:7: note: conversion of argument 1 would be ill-formed: main.cpp:50:16: error: invalid conversion from 'char*' to 'short int' [-fpermissive] 50 | cin>>(s+1); l=strlen(s+1); | ~~^~~ | | | char* main.cpp:50:16: error: cannot bind rvalue '(short int)(((char*)(& s)) + 1)' to 'short int&' /usr/include/c++/12.2.1/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>; __istream_type = std::basic_istream<char>]' (near match) 175 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/12.2.1/istream:175:7: note: conversion of argument 1 would be ill-formed: main.cpp:50:16: error: invalid conversion from 'char*' to 'short unsigned int' [-fpermissive] 50 | cin>>(s+1); l=strlen(s+1); | ~~^~~ | | | char* main.cpp:50:16: error: cannot bind rvalue '(short unsigned int)(((char*)(& s)) + 1)' to 'short unsigned int&' /usr/include/c++/12.2.1/istream:179:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 179 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/12.2.1/istream:179:7: note: conversion of argument 1 would be ill-formed: main.cpp:50:16: error: invalid conversion from 'char*' to 'int' [-fpermissive] 50 | cin>>(s+1); l=strlen(s+1); Non zero exit status: 1

Ceva nu functioneaza?