I JUST TOLD YOU!!
Are you stupid?
Can someone close this thread? For pete's sake!
Printable View
I JUST TOLD YOU!!
Are you stupid?
Can someone close this thread? For pete's sake!
I'm not the one who's stupid, 'cause you haven't explained what that is. And you are pretending you are. Your stupid !
"read on static data members" is that your explanation. It's very informative! It doesn't even form a sentence !
just learn about how static member functions work.Quote:
Originally Posted by ElastoManiac
You call it like
Single &instance = Single::instance();
I'm calling for a boycott on this lazy bum. Cool it Mario. If he's not getting it, he will someday...
all you can say is " he can't understand it "
you'r not a good source of information, goodbye.
Wow, I have never seen such a heated debate.
One example of a static data member:
I am not sure if that example is what you are looking for, but usuallyCode:class Foo
{
public:
Foo() {};
~Foo() {};
static int s_data; // static data member
// static member function
static int getData()
{
return s_data;
}
};
// initalize static data member
int Foo::s_data = 0;
all static class member functions are defined as shown. I do not want
to get caught up in the debate with you and mario, I am just trying to
understand the problem. Of course, you are free to ignore this post if it
is not want you were after.
private