How do I have an array that has a set of coordinates in c++? : <p>I'm trying to record the coordinates in an array.  So I want to record something like {{0,0},{0,1},{1,1}}.  I thought about separating both integers by a space, and have the entire thing as a string, so (15 5) would be different than (1 55).  I assume it's not very efficient, and using string arrays are very difficult.</p>

<p>Here's the (bad) code I have so far:</p>

<pre><code>#include &lt;string&gt;
#include &lt;iostream&gt;
using namespace std;

int main(int argc, const char * argv[]) {
    bool going=true;
    int x=0;
    int y=0;
    string coordinates[] = {};
    while (going==true){
        to_string(y)+","+to_string(x) &gt;&gt; coordinates;
        x++;
    }
    return 0;
}
</code></pre>

<p>What do I use?</p>
