QuoteIt works fine in Dev-C++ but when I try to compile it in Microsoft Visual C++ 2005 proffesional edition I get errors. O____OAre you sure you are not compiling under .NET, (VC++ 2005 can compile both native and IL executable images), as .NET has some quite significant changes.
It works fine in Dev-C++ but when I try to compile it in Microsoft Visual C++ 2005 proffesional edition I get errors. O____O
first I thought that the first lesson started you off with hello world... not that it matterssecond Im using MS visual C++ 6 and your more recently posted source works fine with it...
iostream.h is depreciated use iostream.
You need to declare the namespace you wish to use. Put 'using namespace std' below your include statements..
?
Quote from: Hyrule_boy on August 22, 2006, 11:30:11 am?He meant, you didn't follow my advice in your updated code.
//Oefening1: Klassen en objecten#include <iostream>namespace std//De klassendeclaratieclass Breuk{private: int teller,noemer;//Klasse-variablen public: void Ingeven();//Methoden void Tonen();};//De klassedefinitievoid Breuk::Ingeven(){ cout<<endl<<"Geef de waarden van teller en noemer:"; cin>>teller>>noemer;}void Breuk::Tonen(){ cout<<endl<<"De breuk is :"<<teller<<"/"<<noemer<<endl;}//Het hoofdprogrammaint main(){ Breuk B1; B1.Ingeven(); B1.Tonen(); return 0;}