please explain sequentially how the program proceeds!
#include<iostream.h>
#include<conio.h>
class test
{
int code;
static int count;
public:
void setcode(void)
{
code=++count;
}
void showcode(
{
cout<<"object member="<<code<<endl;
}
static void showcount(void)
{
cout<<"count="<<count<<endl;
}
};
int test::count;
int main()
{
test t1,t2;
t1.setcode(); /* starting from here*/
t2.setcode();
test::showcount;
test t3;
t3.setcode();
test::showcount();
t1.showcode();
t2.showcode(); /*till here, plz explain */
return(0);
getch();
}
This post has been edited by brainy_creature: 26 October 2006 - 05:06 AM

New Topic/Question
Reply




MultiQuote


|