從數組中打印元素會導致中止。中止消息表示無效的空指針。VS在打印字符串數組元素時中止 - C++
#include <iostream>
#include <string>
using namespace std;
int main()
{
int day = 5, year = 2015;
const string months[13] = { 0, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
cout << months[5] << " " << day << ", " << year << endl;
}