simple 2D array question

I want to declare a 2D array whose number of rows is stored in a variable. The compiler does not allow me to do that. I was wondering if anyone could give me any suggestion.

line = Func(filename);
int array[line][5];
You can, but you need to declare a dynamic array:

int* a = new int[line][5];
that also doesnt work in VS2010. It gives an error
Topic archived. No new replies allowed.