#include <iomanip>
#include <string>
using namespace std;
void ToXmlStream(std::ostream& os)
{
std::string strQuery;
os << "<query>" << strQuery << "</query>";
}
int main() {
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvbWFuaXA+CiNpbmNsdWRlIDxzdHJpbmc+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdm9pZCBUb1htbFN0cmVhbShzdGQ6Om9zdHJlYW0mIG9zKQp7CglzdGQ6OnN0cmluZyBzdHJRdWVyeTsKCW9zIDw8ICI8cXVlcnk+IiA8PCBzdHJRdWVyeSA8PCAiPC9xdWVyeT4iOwp9CgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCXJldHVybiAwOwp9
prog.cpp: In function 'void ToXmlStream(std::ostream&)':
prog.cpp:9:5: error: no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'const char [8]')
os << "<query>" << strQuery << "</query>";
^
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/iomanip:40,
from prog.cpp:1:
/usr/include/c++/5/bits/basic_string.h:5170:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/5/bits/basic_string.h:5170:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'const char [8]'
os << "<query>" << strQuery << "</query>";
^
In file included from prog.cpp:1:0:
/usr/include/c++/5/iomanip:79:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Resetiosflags)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
^
/usr/include/c++/5/iomanip:79:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: cannot convert '"<query>"' (type 'const char [8]') to type 'std::_Resetiosflags'
os << "<query>" << strQuery << "</query>";
^
In file included from prog.cpp:1:0:
/usr/include/c++/5/iomanip:109:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setiosflags)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
^
/usr/include/c++/5/iomanip:109:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: cannot convert '"<query>"' (type 'const char [8]') to type 'std::_Setiosflags'
os << "<query>" << strQuery << "</query>";
^
In file included from prog.cpp:1:0:
/usr/include/c++/5/iomanip:143:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setbase)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
^
/usr/include/c++/5/iomanip:143:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: cannot convert '"<query>"' (type 'const char [8]') to type 'std::_Setbase'
os << "<query>" << strQuery << "</query>";
^
In file included from prog.cpp:1:0:
/usr/include/c++/5/iomanip:178:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setfill<_CharT>)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
^
/usr/include/c++/5/iomanip:178:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: mismatched types 'std::_Setfill<_CharT>' and 'const char*'
os << "<query>" << strQuery << "</query>";
^
In file included from prog.cpp:1:0:
/usr/include/c++/5/iomanip:208:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setprecision)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
^
/usr/include/c++/5/iomanip:208:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: cannot convert '"<query>"' (type 'const char [8]') to type 'std::_Setprecision'
os << "<query>" << strQuery << "</query>";
^
In file included from prog.cpp:1:0:
/usr/include/c++/5/iomanip:238:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setw)
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
^
/usr/include/c++/5/iomanip:238:5: note: template argument deduction/substitution failed:
prog.cpp:9:8: note: cannot convert '"<query>"' (type 'const char [8]') to type 'std::_Setw'
os << "<query>" << strQuery << "</query>";
^