I am in the process of learning C++ and I ran into a "Stack Smashing" error when I attempted to create a simple multiplication table using an array of integers (as shown below). The code executes successfully, but at the bottom I am told "Stack Smashing Detected".
Does anyone know what could be causing this error?
int timesTable[10][10] = {};
for (int i = 1; i < 11; i++) {
    for (int j = 1; j < 11; j++) {
        timesTable[i][j] = i * j;
        if (j == 10) {
            cout << timesTable[i][j] << endl;
        }
        else {
            cout << timesTable[i][j] << ", " << flush;
        }
    }
}
return 0;
 
     
    