for gui try this ref : http://www.qtcentre.org/threads/23295-Array-of-QLabel
Create new Project

In the code pane write these codes:

 

Us this code
 

#include <iostream>
using namespace std;
int main()
{
    int n1[] = {1,2,3,4,5,6};
    string str1[6] = { "A","B","C","D","E","F"};
     cout << "Starting Nested Array!" << endl;
    for(int i=0; i< 6; i++)
    {
        cout<<" "<< str1[i];
        for(int j=0; j <8; j++)
        {
            cout<<" "<<n1[j];
        }
        cout<<"\n"<<endl; 
    }
    cout << "Nested array Ended!" << endl;
    return 0;
}

			
OR Over run corrected in the nested over loop
 
#include <iostream>
using namespace std;
void  dosomething()
{
    int n1[] = {1,2,3,4,5,6};
    string str1[6] = { "A","B","C","D","E","F"};
     cout << "Starting Nested Array!" << endl;
    for(int i=0; i< 6; i++)
    {
        cout<<" "<< str1[i];
        for(int j=0; j <6; j++)
        {
            cout<<" "<<n1[j];
        }
        cout<<"\n"<<endl;
    }
    cout << "Nested array Ended!" << endl;
}
int main()
{
    dosomething();
    return 0;
}

			

			

		
Hit save all:

Rune time: Note nested for-loop was set two run 2 more cycles, as array space holder  is predetermined, inner lop or nested for loop draws machine created values for the over run. 

Correcting over-run by a nested loop