I wrote a for loop that prints a dynamic array. Thus, when sizes of array are too big, the loop prints too many lines. So, how can I break the loop whenever I press a specific key?
Here is my code:
for(int x = 0; x < lineCombCount; x++){
for(int y = 0; y < dirCombCount; y++)
{
combRowNum++;
cout << combRowNum << " >> ";
for(int z = 0; z < allLineNumber; z++)
{
cout << arryLine[x][z] + arryDir[y][z] << " ";
}
cout << endl;
}
}