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

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

Pregunta

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 ?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top