Hello !
I'm studying software development and C++ I have a task, where I have the text file with information about USA presidents. All the lines are as follows:
Washington 1789-1797 2/22/1732 12/14/1799
Obama 2009– 8/4/1961 —
So there's a name, years when the president was in the office, birthdate and the date of death. The spaces between are tabulations ("\t"). So the task now is to get the president's age from this information. Output has to be "Washington lived 67 years old." Or with Obama "Obama is 49 years old." I can do all the reading from the file and so on. I started with creating a vector for all this information but I just do not know how on Earth I can subtract these two strings.
Help !