I came across this when I was reading a book on Java.
In the book, there is a note trying to explain what's equivalent in C++ to
So my question is what's the difference between
and
and
I am learning c++ without a teacher and have no where to turn to. Arrays and pointers are getting very confusing. Your help is highly appreciated.
In the book, there is a note trying to explain what's equivalent in C++ to
Code:
double[][] balance = new double[10][6]; // Java
Code:
double balance[10][6];
Code:
double (*balance)[6] = new double[10][6];
Code:
double** balance = new double* [10];
I am learning c++ without a teacher and have no where to turn to. Arrays and pointers are getting very confusing. Your help is highly appreciated.
Comment