Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > what is the difference between "struct" and "class"?

Reply
Thread Tools

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

 
 
XiongBin
Guest
Posts: n/a
 
      10-26-2005
anybody who tell me: what is the difference between "struct" and
"class"?


 
Reply With Quote
 
 
 
 
makc.the.great@gmail.com
Guest
Posts: n/a
 
      10-26-2005
struct members are public by default

 
Reply With Quote
 
 
 
 
tianye@kingsoft.net
Guest
Posts: n/a
 
      10-26-2005
except the default access popedom, there is only felling left

 
Reply With Quote
 
Tim Love
Guest
Posts: n/a
 
      10-26-2005
"XiongBin" <(E-Mail Removed)> 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

 
Reply With Quote
 
Christian Meier
Guest
Posts: n/a
 
      10-26-2005
"XiongBin" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed) 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


 
Reply With Quote
 
Ferdi Smit
Guest
Posts: n/a
 
      10-26-2005
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: http://www.velocityreviews.com/forums/(E-Mail Removed)
Room: C0.07 Phone: 4229
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      10-26-2005
(E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 7.17 What's the difference between dynamic and lexical (static) scoping? Between local() and my()? PerlFAQ Server Perl Misc 0 04-15-2011 04:00 AM
FAQ 7.17 What's the difference between dynamic and lexical (static) scoping? Between local() and my()? PerlFAQ Server Perl Misc 0 01-06-2011 05:00 PM
difference between between these "char"s arnuld C++ 33 03-05-2007 03:11 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Exact difference between 'const char *' and 'char *', also diff between 'const' and 'static' Santa C Programming 1 07-17-2003 02:10 PM



Advertisments