#include "Grid.h" #include "SpreadsheetCell.h" #include #include using namespace std; void processIntGrid(Grid& inGrid) { // body omitted for brevity } int main(int argc, char** argv) { Grid myIntGrid; // declares a grid that stores ints myIntGrid.setElementAt(0, 0, 10); int x = myIntGrid.getElementAt(0, 0); Grid grid2(myIntGrid); Grid anotherIntGrid = grid2; //Grid test; // WILL NOT COMPILE //Grid<> test; // WILL NOT COMPILE Grid mySpreadsheet; SpreadsheetCell myCell; mySpreadsheet.setElementAt(3, 4, myCell); Grid myStringGrid; myStringGrid.setElementAt(2, 2, "hello"); Grid > gridOfVectors; // Note the extra space! vector myVector; gridOfVectors.setElementAt(5, 6, myVector); //Grid> gridOfVectors; // INCORRECT SYNTAX Grid* myGridp = new Grid(); myGridp->setElementAt(0, 0, 10); x = myGridp->getElementAt(0, 0); delete myGridp; return (0); }