This gives me two errors.
error C2327: 'Polygon::numOfSides' : is not a type name, static, or enumerator
error C2065: 'numOfSides' : undeclared identifier
That's not how you make a dynamic array. You would need to use new in your constructor and delete in the destructor. Look here for more info: http://www.cplusplus.com/doc/tutorial/dynamic/
You could also use a vector and set it's size when you construct your own object so you don't have to worry about deleting it.