By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,459 Members | 1,377 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,459 IT Pros & Developers. It's quick & easy.

about static members in a class.

P: n/a
hello,
does it matter whether a static member as in :
class A
{
private :
int a;
....
static int t; //whether this is private or public
};
and definition of t is here ....
does it matter whether t is private or public ???
thanx
ranjan.

Aug 1 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

maadhuu wrote:
hello,
does it matter whether a static member as in :
class A
{
private :
int a;
...
static int t; //whether this is private or public
};
and definition of t is here ....
does it matter whether t is private or public ???
thanx
ranjan.


Aug 1 '05 #2

P: n/a
maadhuu wrote:
hello,
does it matter whether a static member as in :
class A
{
private :
int a;
...
static int t; //whether this is private or public
};
and definition of t is here ....
does it matter whether t is private or public ???


Of course. Just like with any other member.

V
Aug 1 '05 #3

P: n/a
* maadhuu:
hello,
does it matter whether a static member as in :
class A
{
private :
int a;
...
static int t; //whether this is private or public
};
and definition of t is here ....
does it matter whether t is private or public ???


Only wrt. access from client code.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Aug 1 '05 #4

P: n/a

"maadhuu" <ma************@yahoo.com> wrote in message
news:3c******************************@localhost.ta lkaboutprogramming.com...
hello,
does it matter whether a static member as in :
class A
{
private :
int a;
...
static int t; //whether this is private or public
};
and definition of t is here ....
does it matter whether t is private or public ???


It matters in exactly the same way as for
a nonstatic member.

-Mike
Aug 1 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.