HEllo everybody !!!
i have a little problem..
i m making a program in which i have to do bitwise addition.
mean if the 1st input is 111 and the 2nd input is 11 then the output is 1010 i have made my logic but where i have the problem is that i have to take the input in a single array and where the user enters the space it means that the input in 1st array has been ended and the input of second array is upto \0 i dont understand that how i check where the user enters the space thats the problem...
so kindly somebody plz explain it that how i will do this.....
thnx in advance

Recommended Answers

All 2 Replies

What have you tried so far?

Take input in a string. Now you can check character by character that where the space character is entered.

if ( str.at(index) == ' ' )

Condition will be true if there is a space character at the index position.

I hope that this might be helpful for you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.