Struct vs. Classes

I'm a beginner learning C++ and I'm wondering what the deference is between structs and classes. I don't know that much yet, but they seem to do the same thing. Are there Pros and Cons to each? Am I totally wrong and they aren't even remotely similar?
> but they seem to do the same thing.

They are the same thing. Except for the default access (and except when they appear as template parameters; you can ignore this nicety for now) . You can use either keyword.

http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Fcplr054.htm
Last edited on
Topic archived. No new replies allowed.