But I'm getting an "No instance of function "std::atoi" matches the argument list in "main.cpp"" error.
Any ideas what I'm doing wrong?
Cheers,
Darius
Hi there, I'm having a problem with atoi that I can't work out.
I'm trying to parse a querystring and isolate the number then convert that to an int.
Here's the code I'm having trouble with:
<<code>>
void writeServerUploadFreq(string suf){
suf.replace(0,17,"");
suf.replace(suf.find(" HTTP/1.1"),10,"");
pc.printf("Server update freq changed = %s\n\r",suf);
int tmp = atoi(suf);
}
<</code>>
But I'm getting an "No instance of function "std::atoi" matches the argument list in "main.cpp"" error.
Any ideas what I'm doing wrong?
Cheers,
Darius
Hmm, I think I tried that first but had to do some messing around to get it to work. I'll try it and see what happens.
Woohoo. it works. Many thanks. Saves some messing around and makes the code easier to understand.
Hmm, I think I tried that first but had to do some messing around to get it to work. I'll try it and see what happens.
Woohoo. it works. Many thanks. Saves some messing around and makes the code easier to understand.
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
Hi there, I'm having a problem with atoi that I can't work out. I'm trying to parse a querystring and isolate the number then convert that to an int.
Here's the code I'm having trouble with:
But I'm getting an "No instance of function "std::atoi" matches the argument list in "main.cpp"" error.
Any ideas what I'm doing wrong?
Cheers, Darius