How i can Declare a pointer that holds a two dimensional array of double (data type). And how Create an array of doubles that has the number of rows and columns as specified by the user in R and C in C++ language wat is the source code?
Declare a pointer that holds a two dimensional array of double (data type)_......?
_ int R = 50;
_ int C = 30;
_ double** anyName;
_ double anyDouble = 0.0;
_
_ anyName = new double* [R];
_
_ for(int i=0;i%26lt;R;i++)
_ {
___ anyName[i] = new double[C];
___ for(int j=0;j%26lt;C;j++)
___ {
_____ anyName[i][j] = anyDouble;
___ }
_ }
__ %26lt;- these are only used as tabs
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment