123456789101112131415161718192021222324252627282930313233343536
#include <iostream.h> #include <conio.h> class hamed{ public: int a; int b; int show(){ int c; c=a+b; cout<<c<<endl; getch(); } void dob(); }; void hamed::dob(){ int ss=12; cout<<"bay"<<endl<<"ss:"<<ss<<endl; return ; } int main() { hamed f; hamed w; f.a=1; f.b=2; f.show(); w.dob(); hamed &q=f; q.a=5; q.show(); hamed *time=&f; time->show(); ~time->show(); cout<<(*time).show(); return 0; }
"Please use code tags"
1234567
int show(){ int c; c=a+b; cout<<c<<endl; getch(); //return? }
cout<<(*time).show();
no return statement in function returning non-void