Unlike C, an instance of a
struct in C++ is an object in exactly the same way as an instance of a
class. From the point-of-view of the compiled code, they are identical. Memory usage, alignment, access times etc. are exactly the same (i.e. there are no overheads).
From the programmer's point-of-view, there is a very minor difference. Members of a
struct have public visibility by default, whereas members of a
class have private visibility by default. Otherwise, all language features work the same on both, such as constructors/destructors, inheritance, polymorphism, templates, and operator overloading. You can even derive a
struct from a
class, and vice versa.
Despite the similarity, it's quite common to see people deliberately using a
struct in C++ for very simple structures, e.g. where it only consists of a few data members, but no functions. A
class would be used for anything more complex. This is purely a matter of convention or personal preference though, and can be used as a subtle indication of the structure's intended complexity.