#include
#include
class test
{private:
int code;
static int count;
public:
void setcode()
{code=++count;}
void showcode()
{cout<<"code--"<
static void showcount()
{cout<<"count--"<
};
int test::count;
void main()
{clrscr();
test t1,t2;
test::showcount();
t1.setcode();
t1.showcode();
test::showcount();
t2.setcode();
t2.showcode();
test::showcount();
getch();
No comments:
Post a Comment