Convert char to int?
<p>I'm making a battleships game, so when I pass something such as "A10" into the coordinate function it needs to make coloum into letter and row into the number.</p>

<pre><code>Coordinate(std::string coord = "A10")
    {
        char c = coord[0];
        col = c - 16;

        int r = atoi((coord.substr(1,2)).c_str());
        row = r-1;
    };
</code></pre>

<p>so in this example, passing A10 should make col = 0 (A=0,B=1,C=2) and row = 9.</p>

<p>The row equalling 9 seems to work but col equally 0 does not.</p>
