> [...]
> Can anybody tell me how can I do this:
>
> int = Console::Readline();
You can use the Parse() or Convert() methods to convert a string to an int.
Pete
* Allen Maki wrote, On 29-6-2007 23:30:
> Hi everybody,
>
[quoted text clipped - 11 lines]
>
> int = Console::Readline();
In C# it would be something like this:
string i = Console.ReadLine();
int ii = -1;
if ( int32.TryParse(i, NumberStyles.Integer, out ii) )
{
// do stuff with ii
}
else
{
// print error?
}
It shouldn't be hard to convert that to c++ I guess.
Jesse
PS: Please, do not double post (one message for every group), but if you
absolutely need to post in different newsgroups at the same time, cross
post (address one message to multiple groups at once). That way answers
given in the other groups will automatically show up here as well.