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

what is the difference between "struct" and "class"?

P: n/a
anybody who tell me: what is the difference between "struct" and
"class"?
:-)

Oct 26 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
struct members are public by default

Oct 26 '05 #2

P: n/a
except the default access popedom, there is only felling left

Oct 26 '05 #3

P: n/a
"XiongBin" <hu*****@gmail.com> writes:
anybody who tell me: what is the difference between "struct" and
"class"?
:-)

It's a frequency asked question
http://www.parashift.com/c++-faq-lit...s.html#faq-7.8

Oct 26 '05 #4

P: n/a
"XiongBin" <hu*****@gmail.com> schrieb im Newsbeitrag
news:11**********************@z14g2000cwz.googlegr oups.com...
anybody who tell me: what is the difference between "struct" and
"class"?
:-)


Except the default access public/private, the default inheritance is
different, too. For structs the default inheritance is public, for classes
it is private. IIRC this is not written in the FAQ.

Greetings Chris
Oct 26 '05 #5

P: n/a
XiongBin wrote:
anybody who tell me: what is the difference between "struct" and
"class"?
:-)


Another tiny issue is that you can only use the keyword class in a
template template parameter, and not struct. But then we're speaking of
keyword, and not an actual entity.

--
Regards,

Ferdi Smit (M.Sc.)
Email: Fe********@cwi.nl
Room: C0.07 Phone: 4229
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands
Oct 26 '05 #6

P: n/a
ti****@kingsoft.net wrote:
except the default access popedom, there is only felling left


What?

Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Oct 26 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.