I'm trying to figure out how to use the atoi function I have wrote and understand this so far:
#include<iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
int x;
string str="34";
x=atoi(str);
cout<<x;
system("pause");
return 0;
}
And Then I get error reports about a freakin const char?! HELP!
CPPRULZ 0 Junior Poster in Training
CoolGamer48 65 Posting Pro in Training
CPPRULZ 0 Junior Poster in Training
CoolGamer48 65 Posting Pro in Training
Salem commented: Say yes to string streams, no to atoi +20
CPPRULZ 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.