I have a square 2D geometry of of 2x2 square meters. I want to split it into certain number of squares and i want my program to read coordinates of each vertices. That will be the input for main program.
You could probably do this with an array (preferably std::array).
You would have to determine on the "size" of each square though - for instance, you could create an array with 20 rows (10 cm per square), or one with 50 rows (2 cm per square).
Perhaps if you could clarify your question a little bit more, perhaps with some example code, we could be of more assistance.