Well, that's what you'd also have to do if you used an array... What does your program do? How do you want to use this multi-dimensional array in your program? I don't suppose you enter the values for 9000000 elements yourself... How are these calculated?
Well, not every element will have a value. Only a select few hundred will have values. The user of the program will enter values for the points that he/she wishes to be marked as a point of interest on the map and then the elements with values will be marked as a yellow dot on the map. The rest will be green.
struct coord
{
int x, y;
coord(int x, int y): x(x),y(y){}
};
int main()
{
std::vector<coord> location;
/// store populated the locations in the vector
location.push_back(coord(10, 35));
location.push_back(coord(5, 72));
location.push_back(coord(109, 2));
location.push_back(coord(60, 1));
}
@ galik: wut is struct, and i guess i oughta learn about those.... wait a minute,, Shape Drawing Library (SDL). is that wut SDL stands for? the two dimensional graphics library.
If you do it with the huge array[][] you have exactly the same problem of how to fill in the correct locations with the correct colour. Basically your huge array[][] is mirroring the screen buffer. So its rather redundant really. Might as well just use the screen buffer and keep a note of the important locations.
Your screen buffer is no different from your original array[][] idea. You have to work out how to fill each location with the right colour. You can clear the screen to black, then draw a green diamond and finally plot your array of user points in yellow.
I feel like I have used up all of you guy's day. haha. If you're feeling up to it, would you mind checking out my other help topic on this forum. Feel free to opt out if you dont feel up to it. http://www.cplusplus.com/forum/beginner/26322/