"->" vs "." to access class members?

‘->’ and ‘.’ notation are carry-overs from ‘C’ structs and pointers. Use in C++ parallels this.

‘new’ creates the object on the heap dynamically at run time and returns a pointer. Similar idea to ‘malloc()’.

‘Switch switchA;’ creates the object as a variable either in static / global space or on the stack (guess you could say this case is dynamic too) depending on where the declaration / definition is placed.

‘Switch switches[3];’ creates an array of 3 Switch objects.

‘Switch *switches = new Switch[3]’ dynamically creates an array of three switch objects and returns a pointer to the first one.

Edit:
Fixed dynamic array example.