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 ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since this seems to be a homework, so giving complete solution would not be a nice idea.
However, I would give you this hint:
std::bitsetstd::stringand related functions from<algorithm>header.These two together should solve your problem if you learn to use them cleverly.