Alright, here is a small part of my bmp loading function (it''s the only part where my troubles are):
int Setup_Bitmap(BITMAP_FILE_PTR bitmap, UCHAR *filename)
{
int filehandle; //handle to the file
OFSTRUCT filedata; //the OFSTRUCT
//open the file and save it in filehandle
if(!(filehandle = OpenFile(filename, &filedata,OF_READ)))
{
return (0);
}
It says that I need some sort of c-style cast with OpenFile(). I know what c-style casting is, as I have done it many times before, but for some reason, I can''t fix this problem. Here is the error description generated by the compiler;
main.cpp(183) : error C2664: ''OpenFile'' : cannot convert parameter 1 from ''unsigned char *'' to ''const char *''
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Does anyone know how to rid my code of this problem? I have tried filehandle = (HFILE)OpenFile() as well as filehandle = (OFSTRUCT)OpenFile() (which I thought would work) but that does not work. I have tried many things but nothing seems to crack this. Can anyone give me a hand?
There are three types of people in the world; those who can count, and those who can't.
3D Math- The type of mathematics that'll put hair on your chest!