I'm trying to figure out how to use the atoi function I have wrote and understand this so far:
using namespace std;
And Then I get error reports about a freakin const char?! HELP!
Jump to Post
the string::c_str() method converts the contents of an std::string to const char*. For example:
string str1 = "Hello"; const char* str2 = "Hello"; str1.c_str();//would return a value equivalent to str2
You'd be better off using string streams though. there isn't …
All 4 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.