I have function that has three integer values, representing year, month and day. I want to return these values with dashes '-' in between, as in common date format.
e.g.:
int main() {
cout << myfunction() << endl; // this should display like this 2014-04-15
}
string myfunction() {
int year = 2014;
int month = 04;
int day = 15;
// I want to return this value like this
return year-month-day;//2014-04-15
}
Can someone help me?