I want to make a grid of objects. I know how to use an array such as int grid[5][4], but I want to be able to insert an object at any point in the grid so I am planning on using a set. How would I make a grid-ish set of an object named Page?
I want to make a word processing / spreadsheet app, where you would have the pages in a grid. I want to have my pages span so that I can have a spreadsheet, presentation, drawing, and word processing all in one app/window.
Thus I want to do two things:
[A][B][C]
[1]
[2]
[3]
If the above was a table, I want to be able to insert a row/column in between a previous row/column.
Similarly, because the tables may be contained within the pages. I will need to add a page to expand the table.
Also, if the user were doing a drawing, he should be able to right click between 2 pages and insert a new page. On the screen, I do not want the pages to be restricted to only expanding vertically or only horizontally.
If I understand you correctly, are you saying that I would have each column of pages be a vector or deque and then I would have another vector to contain all those vectors or deques?
(I haven't looked into whether I want vector or deque, but why wouldn't I want set?)