• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

2D array of CRect

Hiya

Can anybody tell me how to create a two dimensional array of CRect objects in an MFC application?

John
0
IssacJones
Asked:
IssacJones
1 Solution
 
tg_wilkCommented:
the normal way?

CRect MyArray [5][5]; //5x5 array
 
//and you can access the elements like this;
for (int i=0; i<5; i++)
{
   for (int j=0; j<5; j++)
   {
      CRect rectangle = MyArray[i][j];
   }
}

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now