#1563
AlfaBet
Dându-se un cuvânt să se afișeze literele sale în ordine alfabetică.
Problema | AlfaBet | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 10 MB
/
Stivă 10 MB
|
Id soluție | #49016665 | Utilizator | |
Fișier | alfabet.cpp | Dimensiune | 366 B |
Data încărcării | 12 Februarie 2024, 20:49 | Scor / rezultat | Eroare de compilare |
alfabet.cpp: In function 'int main()': alfabet.cpp:11:14: error: no matching function for call to 'std::basic_istream<char>::get(std::string&)' cin.get(c); ^ alfabet.cpp:11:14: note: candidates are: In file included from /usr/include/c++/4.8/iostream:40:0, from alfabet.cpp:1: /usr/include/c++/4.8/istream:302:7: note: std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::get() [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::int_type = int] get(); ^ /usr/include/c++/4.8/istream:302:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/istream:316:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char] get(char_type& __c); ^ /usr/include/c++/4.8/istream:316:7: note: no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::basic_istream<char>::char_type& {aka char&}' /usr/include/c++/4.8/istream:343:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] get(char_type* __s, streamsize __n, char_type __delim); ^ /usr/include/c++/4.8/istream:343:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/4.8/istream:354:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] get(char_type* __s, streamsize __n) ^ /usr/include/c++/4.8/istream:354:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/istream:377:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::__streambuf_type&, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>; std::basic_istream<_CharT, _Traits>::char_type = char] get(__streambuf_type& __sb, char_type __delim); ^ /usr/include/c++/4.8/istream:377:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/istream:387:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::__streambuf_type&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] get(__streambuf_type& __sb) ^ /usr/include/c++/4.8/istream:387:7: note: no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::basic_istream<char>::__streambuf_type& {aka std::basic_streambuf<char>&}' alfabet.cpp:12:13: error: no match for 'operator>=' (operand types are 'std::string {aka std::basic_string<char>}' and 'char') while(c >= 'a' && c <= 'z'){ ^ alfabet.cpp:12:13: 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:245: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:245:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::pair<_T1, _T2>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:321:5: note: template<class _Iterator> bool std::operator>=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator>=(const reverse_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:321:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:371:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator>=(const reverse_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:371:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1091:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>=(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&) operator>=(const move_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1091:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::move_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1097:5: note: template<class _Iterator> bool std::operator>=(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&) operator>=(const move_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1097:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::move_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2680:5: note: template<class _CharT, class _Traits, class _Alloc> bool 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:2680:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'char' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2692:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2692:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: mismatched types 'const _CharT*' and 'char' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2704:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&) operator>=(const _CharT* __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2704:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: mismatched types 'const _CharT*' and 'std::basic_string<char>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:872:5: note: template<class _Iterator, class _Container> bool __gnu_cxx::operator>=(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:872:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:866:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator>=(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&) operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:866:5: note: template argument deduction/substitution failed: alfabet.cpp:12:16: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' while(c >= 'a' && c <= 'z'){ ^ alfabet.cpp:12:25: error: no match for 'operator<=' (operand types are 'std::string {aka std::basic_string<char>}' and 'char') while(c >= 'a' && c <= 'z'){ ^ alfabet.cpp:12:25: 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from alfabet.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: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::pair<_T1, _T2>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.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>&) operator<=(const reverse_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:315:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator<=(const reverse_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&) operator<=(const move_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::move_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template<class _Iterator> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&) operator<=(const move_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::move_iterator<_Iterator>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2643:5: note: template<class _CharT, class _Traits, class _Alloc> bool 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:2643:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'char' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: mismatched types 'const _CharT*' and 'char' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&) operator<=(const _CharT* __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: mismatched types 'const _CharT*' and 'std::basic_string<char>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:860:5: note: template<class _Iterator, class _Container> bool __gnu_cxx::operator<=(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:860:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' while(c >= 'a' && c <= 'z'){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:854:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<=(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&) operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:854:5: note: template argument deduction/substitution failed: alfabet.cpp:12:28: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' while(c >= 'a' && c <= 'z'){ ^ alfabet.cpp:13:11: error: no match for 'operator[]' (operand types are 'short int [124]' and 'std::string {aka std::basic_string<char>}') vf[c]++; ^ alfabet.cpp:14:18: error: no matching function for call to 'std::basic_istream<char>::get(std::string&)' cin.get(c); ^ alfabet.cpp:14:18: note: candidates are: In file included from /usr/include/c++/4.8/iostream:40:0, from alfabet.cpp:1: /usr/include/c++/4.8/istream:302:7: note: std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::get() [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::int_type = int] get(); ^ /usr/include/c++/4.8/istream:302:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/istream:316:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char] get(char_type& __c); ^ /usr/include/c++/4.8/istream:316:7: note: no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::basic_istream<char>::char_type& {aka char&}' /usr/include/c++/4.8/istream:343:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] get(char_type* __s, streamsize __n, char_type __delim); ^ /usr/include/c++/4.8/istream:343:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/4.8/istream:354:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] get(char_type* __s, streamsize __n) ^ /usr/include/c++/4.8/istream:354:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/istream:377:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::__streambuf_type&, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>; std::basic_istream<_CharT, _Traits>::char_type = char] get(__streambuf_type& __sb, char_type __delim); ^ /usr/include/c++/4.8/istream:377:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/istream:387:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::__streambuf_type&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] get(__streambuf_type& __sb) ^ /usr/include/c++/4.8/istream:387:7: note: no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::basic_istream<char>::__streambuf_type& {aka std::basic_streambuf<char>&}' alfabet.cpp:16:20: error: no match for 'operator<=' (operand types are 'std::string {aka std::basic_string<char>}' and 'char') for(i = 'a'; i <= 'z'; i++){ ^ alfabet.cpp:16:20: 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from alfabet.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: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::pair<_T1, _T2>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.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>&) operator<=(const reverse_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:315:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator<=(const reverse_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&) operator<=(const move_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::move_iterator<_Iterator>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template<class _Iterator> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&) operator<=(const move_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const std::move_iterator<_Iterator>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2643:5: note: template<class _CharT, class _Traits, class _Alloc> bool 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:2643:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'char' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: mismatched types 'const _CharT*' and 'char' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&) operator<=(const _CharT* __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: mismatched types 'const _CharT*' and 'std::basic_string<char>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:860:5: note: template<class _Iterator, class _Container> bool __gnu_cxx::operator<=(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:860:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' for(i = 'a'; i <= 'z'; i++){ ^ 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 alfabet.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:854:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<=(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&) operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:854:5: note: template argument deduction/substitution failed: alfabet.cpp:16:23: note: 'std::string {aka std::basic_string<char>}' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' for(i = 'a'; i <= 'z'; i++){ ^ alfabet.cpp:16:29: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] for(i = 'a'; i <= 'z'; i++){ ^ alfabet.cpp:17:12: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'int' in assignment i1 = i; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AlfaBet face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.