Array: identifier "array" is undefined : <p>Every time I run this code in Visual Studio 2015 it shows the error identifier "treasureLocation" is undefined... what am I doing wrong?</p>

<pre><code>int main()
{
int gridSize [2];
int gridX = 0;
int gridY = 0;
int treasureLoaction[2];
int end;


std :: cout &lt;&lt; "what size grid would you like to play on?" &lt;&lt; std :: endl;

std :: cin &gt;&gt; gridSize [1];
std :: cin &gt;&gt; gridSize [2];

treasureLocation[1] = rand() % gridSize[1] + 1;
treasureLocation[2] = rand() % gridSize[2] + 1;

while (gridY &lt; gridSize[2]) {
    gridY++;
    while (gridX &lt; gridSize[1]) {
        std::cout &lt;&lt; "* ";
        gridX++;
    } 
    std::cout &lt;&lt; "" &lt;&lt; std::endl;
    gridX = 0;
};

std::cout &lt;&lt; treasureLoaction;
std::cin &gt;&gt; end;
return 0;
</code></pre>

<p>}</p>
