converting string to integer problem in c++
<p>i am getting an problem </p>

<pre><code> string ccc="example";
    int cc=atoi(csession);
</code></pre>

<p>it says <code>cannot convert ‘std::string’ to ‘const char*’ for argument ‘1’ to ‘int atoi(const char*)’</code>
do i should convert the string to char array and then apply to <code>atoi</code> or is there is any other way</p>
