c++ check if string contains a character or not and how to convert a binary string into integer

StackOverflow https://stackoverflow.com/questions/13473238

Вопрос

I have a binary string like "01001111111". I want to know that if that string contains "0" or not. How to do that ? And if I want to convert it into integer, how to get that ?

Это было полезно?

Решение

Since this seems to be a homework, so giving complete solution would not be a nice idea.

However, I would give you this hint:

These two together should solve your problem if you learn to use them cleverly.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top