Run id: 156879
Main.cc: In function 'int main()':
Main.cc:6:6: error: conflicting declaration 'int s'
int s=0;
^
Main.cc:4:11: note: previous declaration as 'std::__cxx11::string s'
string a,s;
^
Main.cc:7:9: error: no match for 'operator[]' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string}' and 'std::__cxx11::string {aka std::__cxx11::basic_string}')
while(a[s]!='\0'){
^
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/basic_string.h:831:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
^
/usr/include/c++/5/bits/basic_string.h:831:7: note: no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string}' to 'std::__cxx11::basic_string::size_type {aka long unsigned int}'
/usr/include/c++/5/bits/basic_string.h:848:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
operator[](size_type __pos)
^
/usr/include/c++/5/bits/basic_string.h:848:7: note: no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string}' to 'std::__cxx11::basic_string::size_type {aka long unsigned int}'
Main.cc:8:4: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
s++;
^
Main.cc:10:17: error: no match for 'operator/' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string}' and 'int')
for(int i=0;i}' and 'int')
if(a[i]!=a[s-1-i]){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/stl_iterator.h:328:5: note: candidate: template typename std::reverse_iterator<_Iterator>::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator-(const reverse_iterator<_Iterator>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:328:5: note: template argument deduction/substitution failed:
Main.cc:11:16: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::reverse_iterator<_Iterator>'
if(a[i]!=a[s-1-i]){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/stl_iterator.h:380:5: note: candidate: template decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator-(const reverse_iterator<_IteratorL>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:380:5: note: template argument deduction/substitution failed:
Main.cc:11:16: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::reverse_iterator<_Iterator>'
if(a[i]!=a[s-1-i]){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/stl_iterator.h:1138:5: note: candidate: template decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
operator-(const move_iterator<_IteratorL>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:1138:5: note: template argument deduction/substitution failed:
Main.cc:11:16: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::move_iterator<_Iterator>'
if(a[i]!=a[s-1-i]){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/stl_iterator.h:1145:5: note: candidate: template decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
operator-(const move_iterator<_Iterator>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:1145:5: note: template argument deduction/substitution failed:
Main.cc:11:16: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::move_iterator<_Iterator>'
if(a[i]!=a[s-1-i]){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/stl_iterator.h:923:5: note: candidate: template typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type __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++/5/bits/stl_iterator.h:923:5: note: template argument deduction/substitution failed:
Main.cc:11:16: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
if(a[i]!=a[s-1-i]){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/bits/stl_iterator.h:911:5: note: candidate: template decltype ((__lhs.base() - __rhs.base())) __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++/5/bits/stl_iterator.h:911:5: note: template argument deduction/substitution failed:
Main.cc:11:16: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
if(a[i]!=a[s-1-i]){
^