Hey, I have an array of ints that are read from a file then stored in an unsigned char array. The array is declared in a static link. The pointer is then passed to main.
Main then calls a DLL which will process the information that is stored in the unsigned char. I'm having problems converting from the unsigned char into the int array.
What I have so far:
myStream.seekg (0, ios::end);//moves to the end of the file.
fileSize = myStream.tellg();//gets the size of the file in bytes.
myStream.seekg(0, ios::beg);//return to begginning.
size = fileSize +1;//plus one for terminating character
imgArray = new unsigned char *[size];
myStream.read(reinterpret_cast<char *> (imgArray),(size)*sizeof(unsigned char));
This is the code that reads it into the array.
void DLL_Cubic(C1dArray* imgArray)
{
int size;
int *pArray;
size = imgArray->getSize();
pArray = new int [size];
}
Start of the DLL and the int that will store the array.
What kind of conversion would work to put it back into the array? Scratching my head at this one. Thanks in advance.