Skip to main content
edited body
Source Link
Emad Ahmed
  • 560
  • 4
  • 6

if you want to decalredeclare a pre-defined pointer array:

int **x;
x = new int*[2] { 
        new int[2] { 0, 1 },
        new int[2] { 2, 3 } 
    };

access:

cout << x[0][0];

if you want to decalre a pre-defined pointer array:

int **x;
x = new int*[2] { 
        new int[2] { 0, 1 },
        new int[2] { 2, 3 } 
    };

access:

cout << x[0][0];

if you want to declare a pre-defined pointer array:

int **x;
x = new int*[2] { 
        new int[2] { 0, 1 },
        new int[2] { 2, 3 } 
    };

access:

cout << x[0][0];
Post Undeleted by Emad Ahmed
Post Deleted by Emad Ahmed
Source Link
Emad Ahmed
  • 560
  • 4
  • 6

if you want to decalre a pre-defined pointer array:

int **x;
x = new int*[2] { 
        new int[2] { 0, 1 },
        new int[2] { 2, 3 } 
    };

access:

cout << x[0][0];