P. 1
object oriented concepts

object oriented concepts

5.0

|Views: 424|Likes:
Published by jaykrishna
presentation was very nice , it is helpful to one and all
presentation was very nice , it is helpful to one and all

More info:

Published by: jaykrishna on Feb 16, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

11/17/2012

pdf

text

original

Provide a very generic functionality that doesn’t require us to
instantiate the class.

Can be called using the class name.

class demo
{

static int num;
int color;
public:
demo(int a):color(a){}
static int getNum()
{

return num;

}
int getColor(){ return color; }

};
Int demo::num=45;

void main()
{

demo d(77),e(88);
cout << d.getColor() << endl;
cout << e.getColor() << endl;
cout << demo::getNum();

}

Digitech Technologies

64

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->