|
-
March 23rd, 2009, 04:39 AM
#13
Re: classes question
Hello Abhishek Chauhan
I think you understood OP's confusion but not what's been said here.
I do too think that when the OP asked "why structure" in place of "class",
he was actually thinking about the struct in C, and not the struct in C++
In C++, the keyword struct and class are used interchangeably,
the difference of which is what's been said by Plasmator and others.
For example, some use the keyword struct for POD type,
so it really is a matter of perference.
You could do a simple foo class using struct and compile with C++ compiler (not C compiler).
to see this for yourself.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|