MonthNames[0] = "Januaray";
	MonthNames[1] = "Febuary";
	MonthNames[2] = "March";
	MonthNames[3] = "April";
	MonthNames[4] = "May";
	MonthNames[5] = "June";
	MonthNames[6] = "July";
	MonthNames[7] = "August";
	MonthNames[8] = "September";
	MonthNames[9] = "October";
	MonthNames[10] = "November";
	MonthNames[11] = "December";

	for(int n = 0; n < 12; n++)
	{
		cout << MonthNames[n] << endl;
	}

Error 1 error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)

Include the <string> header.

DOH! wow guys, I apologize to who ever looked at this thread. Dont judge me =(

DOH! wow guys, I apologize to who ever looked at this thread. Dont judge me =(

just remember, you can create instances of the std::string class without the header. But, in order to do anything with them, you need it because that's where all the functions/operators are defined.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.