Thank you very much for help.
email: robert....@agf.be
Bob
I use the C-library function atoi to do this, e.g.
CString str("42");
int MyInt = atoi(str);
If you have a string that contains non-numerics, try
CString test("Zaphod Beeblebrox said 'Don't panic!' 42 times.");
int count = atoi(test.Mid(test.FindOneOf("0123456789")));
The argument to atoi in this case ends up as "42 times.", and
atoi ignores the trailing characters that aren't digits.
Katy
... but sometimes it's me asking the easiest questions as well!
MyInt = atoi(str.Mid(str.FindOneOf( "0123456789." )));
Thomas
>
> I'm searching simply for a method of conversion of a Cstring to
> integer :