Counting
count = 0;
// Initialize counter
cin.get(inChar);
// Read the first character
while
(inChar != ‘.’)
{
count++;
// Increment counter
cin.get(inChar);
// Get the next character
}