Getting correct English grammar Does someone know of a better way to get proper grammar in sentences than this method of mine? I don't want to continue with this for my entire huge program if there is a much more elegant way.

#include &lt;iostream&gt;
#include &lt;string&gt;

enum Gender {Male, Female};
enum Capitalized {Capital, NonCapital};

struct Person {
    std::string name;
    Gender gender;
    Person (const std::string&amp; newName, Gender sex) : name (newName), gender (sex) {}
} *you;


std::string youHeShe (const Person* person, Capitalized capital = NonCapital) {
    return (capital == NonCapital) ? 
        ( (person == you) ? "you" : (person-&gt;gender == Male) ? "he" : "she" ) :
        ( (person == you) ? "You" : (person-&gt;gender == Male) ? "He" : "She" );
}

std::string isAre (const Person* person) {
    return (person == you) ? "are" : "is";
}

std::string verb (const Person* person, const std::string&amp; verb) {
    return (person == you) ? verb : verb + "s";
}

int main() {
    std::string yourName;
    std::cout &lt;&lt; "What is your name? ";
    std::getline (std::cin, yourName);
    you = new Person (yourName, Male); 
    Person *mary = new Person ("Mary", Female), *bob = new Person ("Bob", Male);
    Person* people[] = {you, mary, bob};
    for (const Person* x : people)
        std::cout &lt;&lt; youHeShe(x, Capital) &lt;&lt; " (" &lt;&lt; x-&gt;name &lt;&lt; ") " &lt;&lt; isAre(x) &lt;&lt; 
        " awesome because " &lt;&lt; youHeShe(x) &lt;&lt; " " &lt;&lt; verb(x, "rock") &lt;&lt; "!" &lt;&lt; std::endl;
}


Output:


  What is your name? John Doe
  
  You (John Doe) are awesome because you rock!
  
  She (Mary) is awesome because she rocks!
  
  He (Bob) is awesome because he rocks!


In my program, there are sentences involving either the 3rd person or the 2nd person, so the grammar has to be correct based on which it is.

Of course, my method will involve many more such grammar functions, but I just need to know if there is a better way before I write those other functions (and special cases).
It seems like you would need to write 3 different sentences for every out you want.
Format strings can help here (maybe not in the edge cases - however you have given no example of those)

"%s rock%s!".
The first string is then either "You", "He", or "She".
The second one is for the "He, She, It the s must fit" rule.

What about the am/are/is/... distinction? You could configure a place holder

#define ARE_IS "{AREIS}"
const std::string DUMB_MESSAGE = "%s" ARE_IS " dumb!";


and then replace ARE_IS with the correct form.

How fitting this solution is, how flexible and how much work you will have with that - we can't guess that with the information given.