Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //person enters a binary string value e.g 10001001;
- //char userInput[32];
- //int value = 0;
- //memset( userInput, 0, 32);
- //std::cin >> userInput;
- //int currentbit = strlen(userinput);
- //for( int i = 0; i < strLen(userInput); ++i )
- //{
- // if( userInput[0] == '1' )
- // {
- // value += 1 << currentBit;
- // }
- // currentBit--;
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement