In C++ a struct is essentially the same thing as a class. You can created methods for the struct, both public and private as well as public and private data. The usage allows for encapsulation in a struct. However, the main uses in C++ for a struct are for compatability with C programs and creating structures with publicly accessable data.