Hello there, i have very low C++ experiences and i need little help in casting a type. I actually in a big dependence for that cast, need it rly hard.
So ...
I have this types :
typedef short DCTELEM;
typedef DCTELEM DCTBLOCK[64];
Array of last type and a pointer to a malloc'ed array of shorts:
DCTBLOCK MQUAD;
short * ptrArray;
I need MQUAD to bet to specific location pointed to by ptrArray;
In C i would prolly write something like
MQUAD = ptrArray + 3 * 2;
and have MQUAD after that pointing to a needed location, but i get
error C2440: '=' : cannot convert from 'short *' to 'DCTBLOCK'
in c++, cuz i know there is a difference in a type of array and a pointer to some-type.
Big thanks in advice.