PDA

View Full Version : TGA Texturing - Char comparison question



31337
12-19-2002, 05:25 PM
Alright here's the deal. I'm trying to determine if a tga file is of the new type or the old type by reading in the footer. In the footer it should contain the string:

"TRUEVISION-XFILE"

So I fread() it in appropriately but here's my problem. I read it into an unsigned char array. When I cout << footer << endl; It shows me the string appropriately, however when I try to strcmp(footer, "TRUEVISION-XFILE") it complains that the first arguement is an unsigned char, and the second is a signed char. How do I check this?? Thanks

mikael_aronsson
12-19-2002, 10:57 PM
Hi !

I can't say that I find the relation to OpenGL here, but anyway...

strcmp((char*) your_unsigned_array, "string_to_compare");

Mikael