Borderou de evaluare (job #1524639)
Utilizator | Data | 14 noiembrie 2015 12:18:24 | |
---|---|---|---|
Problema | Ecuatii 2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void space(std::string&)’:
user.cpp:12:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < str.length(); i++)
^
user.cpp: In function ‘int main()’:
user.cpp:38:27: error: no match for ‘operator+’ (operand types are ‘std::string {aka std::basic_string<char>}’ and ‘int’)
var = var + stoi(var);
^
user.cpp:38:27: note: candidates are:
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/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
^
/usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template argument deduction/substitution failed:
user.cpp:38:37: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
var = var + stoi(var);
^
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/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template<class _Iterator> std::move_iterator<_Iterator> std::operator+(typename std::move_iterator<_Iterator>::difference_type, const std::move_iterator<_Iterator>&)
operator+(typename move_iterator<_Iterator>::difference_type __n,
^
/usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template argument deduction/substitution failed:
user.cpp:38:37: note: mismatched types ‘const std::move_iterator<_Iterator>’ and ‘int’
var = var + stoi(var);
^
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/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2365:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
/usr/include/c++/4.8/bits/basic_string.h:2365:5: note: template argument deduction/substitution failed:
user.cpp:38:37: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
var = var + stoi(var);
^
In file included from /usr/include/c++/4.8/string:53:0,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !