Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
how to "new" a two-dimension array in C++?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="E. Robert Tisdale, post: 1518147"] [i][i][i] That's lame. Try // allocation double** pp = new double* [n]; pp[0] = new double [n*m]; for (int i = 1; i < n; ++i) pp[i] = pp[i-1] + m; // use pp[i][j] // deallocation delete [] pp[0]; delete [] pp; Take a look at The C++ Scalar, Vector, Matrix and Tensor class Library [URL]http://www.netwood.net/~edwin/svmtl/[/URL][/i][/i][/i][/i][/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
how to "new" a two-dimension array in C++?
Top