kthpath.cpp: In function 'int main()':
kthpath.cpp:90:6: error: ambiguous overload for 'operator=' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' and 'std::basic_ostream<char>')
ans =
^
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bitset:47,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:65,
from kthpath.cpp:8:
/usr/include/c++/5/bits/basic_string.h:558:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>] <near match>
operator=(const _CharT* __s)
^
/usr/include/c++/5/bits/basic_string.h:558:7: note: conversion of argument 1 would be ill-formed:
kthpath.cpp:91:14: error: invalid user-defined conversion from 'std::basic_ostream<char>' to 'const char*' [-fpermissive]
cout << ans << endl;
^
In file included from /usr/include/c++/5/ios:44:0,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:66,
from kthpath.cpp:8:
/usr/include/c++/5/bits/basic_ios.h:120: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++/5/bits/basic_ios.h:120:7: note: no known conversion from 'void*' to 'const char*'
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bitset:47,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:65,
from kthpath.cpp:8:
/usr/include/c++/5/bits/basic_string.h:569:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>] <near match>
operator=(_CharT __c)
^
/usr/include/c++/5/bits/basic_string.h:569:7: note: conversion of argument 1 would be ill-formed:
kthpath.cpp:91:14: error: invalid user-defined conversion from 'std::basic_ostream<char>' to 'char' [-fpermissive]
cout << ans << endl;
^
In file included from /usr/include/c++/5/ios:44:0,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:66,
from kthpath.cpp:8:
/usr/include/c++/5/bits/basic_ios.h:120: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++/5/bits/basic_ios.h:120:7: note: no known conversion from 'void*' to 'char'