What is difference between structure and class?

Answer:
At the simplest level, a structure is a class where the default access specifier is public, instead of private.

Formally, a structure is a class that has no methods, be they constructor, destructor, or otherwise, nor access specifiers. I make this distinction because some C++ compilers do not differentiate, and will allow you to create them, but structures with methods or access specifiers are outside the language definition.
First answer by Alex146. Last edit by Alex146. Contributor trust: 420 [recommend contributor recommended]. Question popularity: 1 [recommend question].