foo.cc: In function ‘int digit(int, int)’:
foo.cc:28:42: error: ‘pow’ was not declared in this scope
28 | int tmp=static_cast<int>(pow(10,i));
| ^~~
foo.cc: In function ‘int main()’:
foo.cc:41:17: warning: right operand of comma operator has no effect [-Wunused-value]
41 | cin>>L,R;
| ^
foo.cc:44:27: error: ‘x’ was not declared in this scope
44 | int len=to_string(x).size();
| ^
foo.cc:45:22: warning: left operand of comma operator has no effect [-Wunused-value]
45 | for(int x=L;x<=R,x++){
| ~^~~
foo.cc:45:29: error: expected ‘;’ before ‘)’ token
45 | for(int x=L;x<=R,x++){
| ^
| ;
foo.cc:53:18: error: no match for ‘operator<’ (operand types are ‘std::basic_ostream<char>’ and ‘<unresolved overloaded function type>’)
53 | cout<<ans<endl;
| ~~~~~~~~~^~~~~
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/string:48,
from /nix/gcc-13.2.0/include/c++/13.2.0/bits/locale_classes.h:40,
from /nix/gcc-13.2.0/include/c++/13.2.0/bits/ios_base.h:41,
from /nix/gcc-13.2.0/include/c++/13.2.0/ios:44,
from /nix/gcc-13.2.0/include/c++/13.2.0/ostream:40,
from iostream:41:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:455:5: note: candidate: ‘template<class _Iterator> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’
455 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::reverse_iterator<_Iterator>’
53 | cout<<ans<endl;
| ^~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:500:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’
500 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::reverse_iterator<_Iterator>’
53 | cout<<ans<endl;
| ^~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:1705:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’
1705 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:1705:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::move_iterator<_IteratorL>’
53 | cout<<ans<endl;
| ^~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:1770:5: note: candidate: ‘template<class _Iterator> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’
1770 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_iterator.h:1770:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::move_iterator<_IteratorL>’
53 | cout<<ans<endl;
| ^~~~
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algobase.h:64,
from /nix/gcc-13.2.0/include/c++/13.2.0/string:51:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_pair.h:835:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’
835 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_pair.h:835:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::pair<_T1, _T2>’
53 | cout<<ans<endl;
| ^~~~
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/string:54:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:3817:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
3817 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:3817:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
53 | cout<<ans<endl;
| ^~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:3831:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’
3831 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:3831:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: ‘std::basic_ostream<char>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
53 | cout<<ans<endl;
| ^~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:3844:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
3844 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:3844:5: note: template argument deduction/substitution failed:
foo.cc:53:19: note: mismatched types ‘const _CharT*’ and ‘std::basic_ostream<char>’
53 | cout<<ans<endl;
| ^~~~
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/bits/ios_base.h:46:
/nix/gcc-13.2.0/include/c++/13.2.0/system_error:324:3: note: candidate: ‘bool std::operator<(const error_code&, const error_code&)’
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/system_error:324:31: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘const std::error_code&’
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/system_error:507:3: note: candidate: ‘bool std::operator<(const error_condition&, const error_condition&)’
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/system_error:507:36: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘const std::error_condition&’
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~