Multi-dimensional Array

Hey,

I'm trying to create a program that holds map coordinates and allows the user to pin-point certain locations. I created a multi-dimensional array, but the program crashes at initialization.

1
2
3
4
5
6
7
8
9
10
11
12
13
#define MAP_RANGE 2999

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string mapCoords[MAP_RANGE][MAP_RANGE];

    return 0;
}


I start up the program and the console window opens, but right when it opens a little Windows box pops up and says, "Map.exe has stopped working"

Please help :) Thanks in advance.
Last edited on
You are probably allocating too much memory for the stack. Use a vector instead (or new if you stilll want an array).
What do you mean by new?
Topic archived. No new replies allowed.