How do you plan to count the sentences though? If this is something that you're making for yourself, I'd suggest regex for the latter part.
This means that in the example, the value at *pi (an integer or something) will be squared and overwritten on the old value?
Okay. Is there any advantage of flushing the buffer?
Doesn't endl also implicitly flush the buffer?!