Classes vs. POD

POD = plain old data

Classes that have only public attributes are POD.

By default (with no visibility given) members are public.

struct and class are the same in C++.

Convention: we use struct for POD and class for everything else.


struct LocationAsPod {
  int x;
  int y;

class LocationAsClass {
  int x;
  int y;
  int getX();
  void setX(newX:int);
  int getY();
  void setY(newY:int);