Im trying to write a code that replaces the first letter of every line with a capital letter.
So for starters that would be the part of the code for replacing.
for ex. input : abc
It only replaces the last letter and not the first ones.
Maybe im using the wrong funtion for that. Thanks.
using namespace std;
cout << "Enter a phrase: ";
while ( cin.get(ch))
if (ch == 'a')
if (ch == 'b')
if (ch == 'c')
cout << ch;