I've to count number of words in a string.. so all i'm doing is checking for spaces and increasing it by 1 whenever the condition evaluates to true.
But this program prints the value of count as 1 every time no matter what. What's wrong in this code? Using Visual Studio btw.
when you use cin>>boom, it only reads to the first whitespace, not to the '\0'.
Yes, in place of cin>> it should be gets_s(boom). That helped me understand the concept of stoneage strings.
Thanks Stewbond. :) It'd be great if you'll take look at my new question about the abort() debug error.