Borderou de evaluare (job #1891088)
Utilizator | Data | 23 februarie 2017 18:49:34 | |
---|---|---|---|
Problema | Ghiozdan | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:49:30: error: conflicting declaration ‘int g’
int fr[201],x,poz,k,i,j,nr,n,g,c[75001];
^
user.cpp:48:10: error: ‘g’ has a previous declaration as ‘std::ofstream g’
ofstream g("ghiozdan.out");
^
user.cpp: In function ‘int main()’:
user.cpp:52:6: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’
f>>n>>g;
^
In file included from /usr/include/c++/4.8/fstream:38:0,
from user.cpp:1:
/usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::basic_ofstream<char>]’
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^
user.cpp:60:19: error: invalid user-defined conversion from ‘std::ofstream {aka std::basic_ofstream<char>}’ to ‘int’ [-fpermissive]
for (j=g; j>=0; j--) if (c[j])
^
In file included from /usr/include/c++/4.8/ios:44:0,
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_ios.h:115:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
operator void*() const
^
/usr/include/c++/4.8/bits/basic_ios.h:115:7: note: no known conversion for implicit ‘this’ parameter from ‘void*’ to ‘int’
user.cpp:61:48: error: no match for ‘operator<=’ (operand types are ‘int’ and ‘std::ofstream {aka std::basic_ofstream<char>}’)
for(k=1; k<=fr[i] and j+k*i<=g ; k++)
^
user.cpp:61:48: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
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/stl_pair.h:239:5: note: template<class _T1, class _T2> constexpr bool std::operator<=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note: template argument deduction/substitution failed:
user.cpp:61:50: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
for(k=1; k<=fr[i] and j+k*i<=g ; k++)
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
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/stl_iterator.h:315:5: note: template<class _Iterator> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !