#include #include #include using namespace std; // myVectorClassConstructor1.cpp // using parameter aliases in a class constructor class Month { public: string name; int number; Month(){ "\n defalut constructor ";} Month(string str1,int n1):name(str1),number(n1) { cout<<"\n \t string and integer constructor "; cout<<"\n \t \t month name :"<< name << " , number "<< number; } }; int main() { // string str1[] = {"Jan","Feb","Mar", "Apr"}; int n1Array[]= {0,1,2,3,4}; cout<<"\n using class constructor alone"; Month(str1[1], n1Array[1]); Month(str1[2], n1Array[2]); cout<<"\n----------------"; cout<<"\n using a vector vectormonth " ; vectormonth; month.push_back(Month(str1[0], n1Array[0])); month.push_back(Month(str1[1], n1Array[1])); month.push_back(Month(str1[2], n1Array[2])); cout<<"\n -------"; return 0; }