hi...uh...again,
I know I ask a lot of questions, but I'm really clueless. My HW says I have to write a function that accepts a pointer to a C-string as an argument
and capitalizes that first character of each sentence in the string.
I know the toupper function, but I have no idea how to implement it.
//Program #5 Sentence capitalizer
//write a function that accepts a pointer to a C-string as an argument
//and capitalizes that first character of each sentence in the string.
#include <iostream>
using namespace std;
//function Prototype
void Capitalizer (char *);
int main ()
{
char line[1001];
cout << "This program will capitalize the first letter of each sentence.\n";
cout << "Please enter a phrase of no more than 1000 characters, followed by a period.\n";
cin.getline(line, 1001);
cout << "This is how you should have done: \n";
Capitalizer(line);
cout << endl;
}
void Capitalizer (char *sentencePrt)
{
char *s = sentencePtr;
//got stuck, don't know what else to do from here
}
can you guys give me a clue?