I would like the user to input a sentence that contains quotes around a portion of it and then my program will convert any letters in quotes to upper case.
My problem is how do i write the statement to start toupper() one i == " and end the toupper() one it hits " again.
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <cctype>
#include <cstring>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
char szSentance[128];
int n, i=0;
char c;
cout << "Enter a Sentence of all lower case letters.\n" << endl;
cout << "Place part of the sentence in \"Quotes\". \n" << endl;
cout << "I.E This is a \"Sentence with \"Quotes\". \n" << endl;
cin.getline(szSentance, 128);
while (szSentance[i])
{
c=szSentance[i];
putchar (toupper(c));
i++;
}
n= strlen(szSentance);
cout << "\n\nThe Sentance had a word count of: " << n <<endl;
return 0;
}