Thursday, July 30, 2009

Simple c++ program. help needed/?

Hey guys, i typed this simple code to see if my compiler was running properly but im getting some errors i cant solve. plz help...





#include%26lt;iostream.h%26gt;


#include%26lt;conio.h%26gt;


class A


{


private: int a, b;


public:


void do()


{


cout%26lt;%26lt;"\n"%26lt;%26lt;"enter first no. : ";


cin%26gt;%26gt;a;


cout%26lt;%26lt;"\n"%26lt;%26lt;"enter 2nd no. :";


cin%26gt;%26gt;b;


cout%26lt;%26lt;"\n"%26lt;%26lt;"sum = "%26lt;%26lt;a+b;


}


};


int main()


{


clrscr();


A ob;


ob.do();


getch();


return 0;


}

Simple c++ program. help needed/?
do is a keyword, change function name to something else
Reply:What are the errors?





http://catb.org/~esr/faqs/smart-question...


No comments:

Post a Comment