How to Solve C++ Error: “no matching function for call to ‘atoi/atof’”

Summary
Error “no matching function for call to’atoi/atof'” error

Code
First make sure you set

using namespace std;

Secondly, pay attention to that you used a string instead of a char array
So:
change to

string inputstr = "111";
i = atoi(inputstr.c_str());

Done

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *