ah ha I see, so 0 being ASCII 48 and 1,2,3 being 49,50,51 you just subtract 48 to convert from ASCII to fingers and toes. very good.
atoi seems to be working now too. thanks a lot.
Type: Posts; User: dean11
ah ha I see, so 0 being ASCII 48 and 1,2,3 being 49,50,51 you just subtract 48 to convert from ASCII to fingers and toes. very good.
atoi seems to be working now too. thanks a lot.
Thanks Daved,
however,
une=abc[1]; // une = "2"
uno=atoi(une);
Hi,
why doesn't this work?
#include <iostream>
using namespace std;
int main()
{
I need to do a lot of operations on the string. This was all easy in Javascript where the processing could be done in a browser but I need a stand-alone exe that will do the same thing.
For a...
Thanks, that's very helpful.
The sites you referred me to are excellent and I have bookmarked them for later.
However, I still get no joy, because
int une = sentstring[0] - '0';...
Hi,
this is "elementary my dear watson" stuff, but it beats me.
I use the following:
cout<<"enter a file name\n\n";
cin>>filenam;
Thanks Dweia.
This worked.
Actually I/O was the very next cprogramming tutorial I had to look at but I thought I was getting in too deep.
My users will be copying in a string about 50 characters long, which the program will decrypt. I have this working fine in a Javascript version. In C++ it's a different story. How can they paste this...