Hi i have to make a function to Dynamically Allocate memory for 4 dimensional array like A[i][j][k][l]
Plz. suggest me the programme for particular problem.
Another is to use boost if you are able. If this is an exercise for a class, then forget it. check out boost.org if you are able as there are quite a few free tools such as an abstraction for a multi-dimensional array.
I have dynamically allocated the Array but it gives an error that the image size crosses the limits so it can not be build.
plz suggest me how i can manage with this problem.
It is possible that the point of the project is to demonstrate the student's proficiency with dynamically allocating arrays and working with them. Using a higher-level construct such as boost would defeat that purpose.
But the test SHOULD be there for testing the students skill in programming. So if he can move out of the textbook and use more efficient and advanced coding, that should be better.
Yeah, but then why learn arrays at all? And besides, what happens if boost isn't available? If you don't know how to make it work by yourself are screwed. The point of most projects IS to reinvent to wheel so you can gain experience figuring out how to code.