Žaidimas su ratais

Taškai: 0

Compile: FAIL

ratai.cpp: In function ‘int pakeisk(int, int, int)’: ratai.cpp:23:28: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator%’ masyvas[3] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:23:40: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator/’ masyvas[3] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:23:40: error: in evaluation of ‘operator/=(int [4], int)’ ratai.cpp:24:28: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator%’ masyvas[2] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:24:40: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator/’ masyvas[2] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:24:40: error: in evaluation of ‘operator/=(int [4], int)’ ratai.cpp:25:28: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator%’ masyvas[1] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:25:40: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator/’ masyvas[1] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:25:40: error: in evaluation of ‘operator/=(int [4], int)’ ratai.cpp:26:28: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator%’ masyvas[0] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:26:40: error: invalid operands of types ‘int [4]’ and ‘int’ to binary ‘operator/’ masyvas[0] = masyvas % 10; masyvas /= 10; ^ ratai.cpp:26:40: error: in evaluation of ‘operator/=(int [4], int)’ ratai.cpp: In function ‘void sudaryk(int)’: ratai.cpp:42:30: error: no matching function for call to ‘std::vector<int>::push_back()’ grafas[taskas].push_back(); ^ In file included from /usr/include/c++/5/vector:64:0, from ratai.cpp:2: /usr/include/c++/5/bits/stl_vector.h:913:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int] push_back(const value_type& __x) ^ /usr/include/c++/5/bits/stl_vector.h:913:7: note: candidate expects 1 argument, 0 provided /usr/include/c++/5/bits/stl_vector.h:931:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int] push_back(value_type&& __x) ^ /usr/include/c++/5/bits/stl_vector.h:931:7: note: candidate expects 1 argument, 0 provided ratai.cpp: In function ‘int main()’: ratai.cpp:61:9: error: ‘e’ was not declared in this scope e = 1000*a + 100*b + 10*c + d; ^ ratai.cpp:65:13: error: too few arguments to function ‘void sudaryk(int)’ sudaryk(); ^ ratai.cpp:34:6: note: declared here void sudaryk(int taskas){ ^

nr.resulttimemessage