S
S
Sazoks2019-03-03 22:58:49
C++ / C#
Sazoks, 2019-03-03 22:58:49

To understand that the next character in the string is a number?

Hello. Can you tell me how to convert a character/string to a number in C++?
And how to determine what this number is?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-03-03
@NeiroNx

As usual - numbers have their own characters "0123456789" that follow each other - you need to compare the character code - it must be between '0' and '9', then add characters to some buffer, and when a character other than digital is encountered - do something. Of course, there are a lot of libraries, but we are considering the general case - when libraries cannot be used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question