Emanoil Kotsev <delop...@yahoo.com> writes: > Hello, I'm trying to learn a bit more of c++. Unfortunately what was > working in g++ 4.2 is not working in 4.3 anymore. Why?
The code you give below has never been valid since C++ was stadardized 11 years ago. > I don't think I'm suppose to be changing my code because of this or > knowing what somebody did change in the compiler. Perhaps I'm > missing something like compatibility for 4.3. You'll have to. > #include <iostream.h> This not a C++ header. Do #include <iostream> #include <ostream> instead. <iostream> provides the object cout and <ostream> those overloads of << which are not member functions. > int main() > { > cout << "The size of an int is:\t\t" << sizeof(int) << " bytes \n"; Note that cout belongs to namespace std. You either have to add a using directive or declaration, or (prefered by me), write std::cout << "The size of an int is:\t\t" << sizeof(int) << " bytes\n"; _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus