What are the built-in functions to compare two dates? I am stuck again.
***EDIT***
Oops forgot to mention I am working a program that will calculate someones age. Using the Month, Day and Year format.
Here is what I got so far
Code:#include <iostream> #include <string> using namespace std; int main () { string x; int currentyear = 2003; int dob = 'x'; int result= 0; cout<<"Enter your Date of birth: ";'\n'; std::getline(std::cin,x); cout<<x<<'\n'; result=currentyear - 'x'; cout<<x<<endl; return 0; }