Looking at 3 ways to instantiate an object of a class I created;
- MyClass myObject = MyClass();
- MyClass myObject();
- MyClass myObject;
I defined a default constructor (which sets up a 2D array), and defined some operator overloads so I can use:
cout << myObject[x][y] << endl;
That line of code works when I instantiate myObject with option 1 or 3, but not 2. VS2017 reports, for that line: "expression must be a pointer to a complete object type".