Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Difference between Structures and Classes Pin
Zeeshan Bilal17-Jun-04 2:18
Zeeshan Bilal17-Jun-04 2:18 
GeneralRe: Difference between Structures and Classes Pin
Antony M Kancidrowski17-Jun-04 2:40
Antony M Kancidrowski17-Jun-04 2:40 
GeneralRe: Difference between Structures and Classes Pin
David Crow17-Jun-04 3:01
David Crow17-Jun-04 3:01 
GeneralRe: Difference between Structures and Classes Pin
Antony M Kancidrowski17-Jun-04 10:07
Antony M Kancidrowski17-Jun-04 10:07 
GeneralRe: Difference between Structures and Classes Pin
David Crow17-Jun-04 10:11
David Crow17-Jun-04 10:11 
GeneralRe: Difference between Structures and Classes Pin
Antony M Kancidrowski17-Jun-04 10:15
Antony M Kancidrowski17-Jun-04 10:15 
GeneralRe: Difference between Structures and Classes Pin
Maximilien17-Jun-04 2:39
Maximilien17-Jun-04 2:39 
GeneralRe: Difference between Structures and Classes Pin
V.17-Jun-04 2:48
professionalV.17-Jun-04 2:48 
2)C++ structure and C++ class
Actually, C++ structure and C++ class are very closely realated. With one exception, they are interchangeable because the structure can also include the data, and the code that manipulates that data, in just the same way that a class can. The only difference between a C++ structure and a class is that, by default, the members of a class are private, while the members of a structure are public (This also clears up an error I made in the first lab). Aside from this distinction, structures and classes perform exactly the same function.

Here is an example of a structure that uses its class-like features.

One last point just in case you are curious about it. A structure defines a class type. Thus, a structure is a class. This was intentional on the part of the inventor of C++ -- Bjarne Stroustrup. He believed that if structures and classes were made more or less equivalent, the transition from C to C++ would be eased.

http://www.cs.uregina.ca/links/class-info/210/LabFAQ/

There it is...

"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
GeneralRe: Difference between Structures and Classes Pin
markkuk17-Jun-04 2:52
markkuk17-Jun-04 2:52 
GeneralRe: Difference between Structures and Classes Pin
Navin17-Jun-04 3:03
Navin17-Jun-04 3:03 
GeneralTime required for copying Pin
pavanhere17-Jun-04 1:13
susspavanhere17-Jun-04 1:13 
GeneralRe: Time required for copying Pin
RChin17-Jun-04 1:22
RChin17-Jun-04 1:22 
GeneralRe: Time required for copying Pin
Henry miller17-Jun-04 3:15
Henry miller17-Jun-04 3:15 
GeneralRe: Time required for copying Pin
Blake Miller17-Jun-04 4:08
Blake Miller17-Jun-04 4:08 
QuestionHow to start app from inside code?? Pin
Anonymous17-Jun-04 1:02
Anonymous17-Jun-04 1:02 
AnswerRe: How to start app from inside code?? Pin
User 665817-Jun-04 1:06
User 665817-Jun-04 1:06 
AnswerRe: How to start app from inside code?? Pin
RChin17-Jun-04 1:11
RChin17-Jun-04 1:11 
AnswerRe: How to start app from inside code?? Pin
Antony M Kancidrowski17-Jun-04 1:37
Antony M Kancidrowski17-Jun-04 1:37 
Generalget the current working directory Pin
shiva shankar17-Jun-04 0:50
shiva shankar17-Jun-04 0:50 
GeneralRe: get the current working directory Pin
Dudi Avramov17-Jun-04 0:56
Dudi Avramov17-Jun-04 0:56 
GeneralManipulate text file Pin
?!?17-Jun-04 0:47
?!?17-Jun-04 0:47 
GeneralRe: Manipulate text file Pin
toxcct17-Jun-04 1:00
toxcct17-Jun-04 1:00 
GeneralRe: Manipulate text file Pin
V.17-Jun-04 2:02
professionalV.17-Jun-04 2:02 
GeneralRe: Manipulate text file Pin
chauteen25-Aug-04 22:44
chauteen25-Aug-04 22:44 
GeneralRe: Manipulate text file Pin
V.25-Aug-04 23:23
professionalV.25-Aug-04 23:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.