Tuesday, 17 April 2012

How the keyword struct is different from the keyword class in C++? | C++

In C++, a class is similar to a struct with the exception that, by default, all the members of a class are private; while the members of a struct are public. Encapsulation is not supported by structures but supported by classes.

No comments: