How to declare a matrix of int?

Hi,

In java I do:

int matrix[][] = new int[2][2];

How I get the same in c/c++?

*I do not want to use vector from stl.
Last edited on
There are many posts around here that talk about dynamically allocating 2D arrays.
I suggest using the site's search feature to find some examples.
Topic archived. No new replies allowed.