prog.cpp: In function 'std::string& ltrim(std::string&)':
prog.cpp:8: error: ISO C++ forbids declaration of 'it2' with no type
prog.cpp:8: error: 'find_if' is not a member of 'std'
prog.cpp:8: error: expected primary-expression before '[' token
prog.cpp:8: error: expected primary-expression before ']' token
prog.cpp:8: error: expected primary-expression before 'char'
prog.cpp:9: error: no matching function for call to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::erase(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, int&)'
/usr/include/c++/4.3/bits/basic_string.h:1131: note: candidates are: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(typename _Alloc::rebind<_CharT>::other::size_type, typename _Alloc::rebind<_CharT>::other::size_type) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
/usr/include/c++/4.3/bits/basic_string.h:1147: note: __gnu_cxx::__normal_iterator<typename _Alloc::rebind<_CharT>::other::pointer, std::basic_string<_CharT, _Traits, _Alloc> > std::basic_string<_CharT, _Traits, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::rebind<_CharT>::other::pointer, std::basic_string<_CharT, _Traits, _Alloc> >) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
/usr/include/c++/4.3/bits/basic_string.h:1167: note: __gnu_cxx::__normal_iterator<typename _Alloc::rebind<_CharT>::other::pointer, std::basic_string<_CharT, _Traits, _Alloc> > std::basic_string<_CharT, _Traits, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::rebind<_CharT>::other::pointer, std::basic_string<_CharT, _Traits, _Alloc> >, __gnu_cxx::__normal_iterator<typename _Alloc::rebind<_CharT>::other::pointer, std::basic_string<_CharT, _Traits, _Alloc> >) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
prog.cpp: In function 'std::string& rtrim(std::string&)':
prog.cpp:15: error: ISO C++ forbids declaration of 'it1' with no type
prog.cpp:15: error: 'find_if' is not a member of 'std'
prog.cpp:15: error: expected primary-expression before '[' token
prog.cpp:15: error: expected primary-expression before ']' token
prog.cpp:15: error: expected primary-expression before 'char'
prog.cpp:16: error: request for member 'base' in 'it1', which is of non-class type 'int'
prog.cpp: In function 'std::string add(std::string, std::string)':
prog.cpp:92: error: invalid initialization of non-const reference of type 'std::string&' from a temporary of type 'const char*'
prog.cpp:13: error: in passing argument 1 of 'std::string& rtrim(std::string&)'