[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

c++: 2D array



hi all,
	how can we declare a 2 dimensional array in c++ on heap. I am
trying to make a Matrix class and need to allocate the array using new in
the constructor. 
	Just wanted to ask if I could do something like:

	int ** a;
	a = new [4][5];

Or some other way to accomplish the above so that I can call a[i][j]
later.

-- 

#!!!	If anything can go wrong, _FIX_ it. (To hell with MURPHY)
	
						Ajay kumar Dwivedi
						 ajayd@xxxxxxxxxx