The buffers may not be getting flushed.
cout << "This is a string with no cr/lf" << flush; //flushes with no cr/lf
cout << "This is a string with a cr/lf" << endl; //flushes with cr/lf
I just put endl in your code below and all is well.
Code:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main ()
{
const int MaxMonths = 12;
for(int k = 0; k < MaxMonths; ++k) // Iterates 12 times
{
switch (k)
{
case 0: {cout << "Janurary " << endl; break;}
case 1: {cout << "Febrary " << endl; break;}
case 2: {cout << "March " << endl; break;}
case 3: {cout << "April " << endl; break;}
case 4: {cout << "May " << endl; break;}
case 5: {cout << "June " << endl; break;}
case 6: {cout << "July " << endl; break;}
case 7: {cout << "August " << endl; break;}
case 8: {cout << "September " << endl; break;}
case 9: {cout << "Octoter " << endl; break;}
case 10: {cout << "November " << endl; break;}
case 11: {cout << "December " << endl; break;}
}
}
return 0;
}