Hi All I'm using MS-VStudio 2005and want to creat two dimension array in the heap(free store ) but when i write the code float *pFloat; pFloat=new float[3][5]; and compile the profram i got the following error error C2440: '=' : cannot convert from 'float (*)[5]' to 'float *' 1>Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast so could someone please tell me what's wrong in my code
You have posted it as an Article under the Article / Source code section. I have moved it to the Queries and Discussion forum. Please take care that you don't repeatedly post the query as an article.
Please DaWei when i tryed the code u suggested float (*pFloat)[5] = new float [3][5]; in my code i got this error error C2040: 'pFloat' : 'float (*)[5]' differs in levels of indirection from 'float *' So what's wrong do u have any suggestions