I tried this but it didnt work.
Code:
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
int main()
{
//c-string: the original c language string.
int month, day;
string str;
char month1[3], day1[3];
cout << "Enter birth date: ";
cin >> str;
day = atoi(day1);
str = (month1 + day);
month = atoi(month1);
if (month == 01)
cout << "january";
else if (month == 02)
cout << "february";
else if (month == 03)
cout << "march";
else if (month == 04)
cout << "april";
else if (month == 05)
cout << "may";
else if (month == 06)
cout << "june";
else if (month == 07)
cout << "july";
else if (month == 8)
cout << "august";
else if (month == 9)
cout << "september";
else if (month == 10)
cout << "october";
else if (month == 11)
cout << "november";
else if (month == 12)
cout << "december";
else if (month > 12)
cout << "Invalid";
cout << str;
_getch();//to pause the program
return 0;
}