Borderou de evaluare (job #1682583)
Utilizator | Data | 10 aprilie 2016 12:18:52 | |
---|---|---|---|
Problema | Examen | Status | done |
Runda | Algoritmiada 2016 Runda 3 Juniori | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:4:14: error: conflicting declaration ‘std::ofstream fout’
ofstream fout("examen.out");
^
user.cpp:3:10: error: ‘fout’ has a previous declaration as ‘std::ifstream fout’
ifstream fout("examen.in");
^
user.cpp:5:9: error: ‘DIM’ was not declared in this scope
int sol[DIM], v[DIM];
^
user.cpp:5:17: error: ‘DIM’ was not declared in this scope
int sol[DIM], v[DIM];
^
user.cpp:6:22: error: ‘DIM’ was not declared in this scope
long long sum = 0, x[DIM], val;
^
user.cpp: In function ‘int main()’:
user.cpp:8:5: error: ‘fin’ was not declared in this scope
fin >> n;
^
user.cpp:8:12: error: ‘n’ was not declared in this scope
fin >> n;
^
user.cpp:10:14: error: no match for ‘operator<<’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘const char [3]’)
fout << "-1";
^
user.cpp:10:14: note: candidates are:
In file included from /usr/include/c++/4.8/string:52:0,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2753:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/4.8/bits/basic_string.h:2753:5: note: template argument deduction/substitution failed:
user.cpp:10:17: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
fout << "-1";
^
In file included from /usr/include/c++/4.8/istream:39:0,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/ostream:471:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^
/usr/include/c++/4.8/ostream:471:5: note: template argument deduction/substitution failed:
user.cpp:10:17: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
fout << "-1";
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !