Borderou de evaluare (job #1027783)

Utilizator sapioitFMI Cosmin Iulian Berindeanu sapioit Data 13 noiembrie 2013 01:25:27
Problema Transport Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:5:1: error: ‘a’ does not name a type a=new nod; c=new nod; a.y=0; ^ user.cpp:5:12: error: ‘c’ does not name a type a=new nod; c=new nod; a.y=0; ^ user.cpp:5:23: error: ‘a’ does not name a type a=new nod; c=new nod; a.y=0; ^ user.cpp: In function ‘void cit()’: user.cpp:7:2: error: ‘ifstream’ was not declared in this scope ifstream fin("transport.in"); ^ user.cpp:7:2: note: suggested alternative: In file included from /usr/local/include/c++/4.8.0/ios:38:0, 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/local/include/c++/4.8.0/iosfwd:157:34: note: ‘std::ifstream’ typedef basic_ifstream<char> ifstream; ^ user.cpp:7:11: error: expected ‘;’ before ‘fin’ ifstream fin("transport.in"); ^ user.cpp:8:2: error: ‘fin’ was not declared in this scope fin>>n>>kl; ^ user.cpp:11:6: error: cannot convert ‘nod’ to ‘nod*’ in assignment c.y=a; ^ user.cpp: In function ‘int trans()’: user.cpp:27:3: error: ‘q’ was not declared in this scope q=0; //cantitate curenta in camion ^ user.cpp:30:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(km=k) c=c.y; ^ user.cpp:30:14: error: no match for ‘operator=’ (operand types are ‘nod’ and ‘nod*’) if(km=k) c=c.y; ^ user.cpp:30:14: note: candidates are: user.cpp:3:8: note: nod& nod::operator=(const nod&) struct nod{ int x; nod* y;}; ^ user.cpp:3:8: note: no known conversion for argument 1 from ‘nod*’ to ‘const nod&’ user.cpp:3:8: note: nod& nod::operator=(nod&&) user.cpp:3:8: note: no known conversion for argument 1 from ‘nod*’ to ‘nod&&’ user.cpp:32:6: error: no match for ‘operator=’ (operand types are ‘nod’ and ‘nod*’) c=c.y; ^

Ceva nu functioneaza?