Does it matter which compiler I use?

I was working on a homework assignment for my intro programming class and I was using GDB online because it's easier for me to tweak things in that environment.

Once it was all working correctly, I copied the code exactly into Putty, but when I went to compile it I got a bunch of error messages.

Is this a normal thing? I was just using the regular iostream library. We are learning user defined functions. Here's an example of the errors, any help would be greatly appreciated.

In file included from /usr/include/c++/4.8.2/string:52:0,
from /usr/include/c++/4.8.2/bits/locale_classes.h:40,
from /usr/include/c++/4.8.2/bits/ios_base.h:41,
from /usr/include/c++/4.8.2/ios:42,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iostream:39,
from lab5.cpp:5:
/usr/include/c++/4.8.2/bits/basic_string.h:2753:5: note: 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++/4.8.2/bits/basic_string.h:2753:5: note: template argument deduction/substitution failed:
lab5.cpp:32:13: note: ‘std::istream {aka std::basic_istream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
cin << entry;
This would generate an on every implementation: cin << entry ;
Should be: cin >> entry ;
Oh good grief, that fixed it. I feel like an idiot.
Thank you for your help!
Topic archived. No new replies allowed.