#include <cctype>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <string>
#include <ctime>
using namespace std;
void dateParse(string);
int main()
{
    string dte1 = "2/5/2014";
    string dte2 = "2/15/2014";
    string dte3 = "12/5/2014";
    string dte4 = "12/15/2014";
    string dts;
    dateParse(dte1);
    dateParse(dte2);
    dateParse(dte3);
    dateParse(dte4);
}
void dateParse(string date)
{
    char day[2] = "";
    char month[2] = "";
    char year[5] = "";
    char buffer[80] = "";
   year = date.substr(date.find("/")+1,date.length());
   strcpy(buffer, year.c_str());
    strcpy(buffer, date.c_str());
    strcpy(day, strtok(buffer,"/"));
    strcpy(buffer, date.c_str());
    strcpy(year, strrchr(date.c_str(), '/'));
    for(int i = 0; i < 5; i++)
    {
        year[i] = year[i + 1];
    }
    strcpy(buffer, date.c_str());
    strcpy(buffer, ((strrchr(date.c_str(),'/')),(strchr(date.c_str(), '/') + 1)));
    strcpy(month, strtok(buffer,"/"));
    cout << "DAY: " << day << endl;
    cout << "MONTH: " << month << endl;
    cout << "YEAR: " << year << endl;
    cout << "--------------------------------" << endl;
}