and it gives me :"error: no match for 'operator==' in 'al_get_pixel(canvas, 320, 240) == "ffcc66"

I am trying to compare the colour of a target pixel and if it's X to paint red but if it's anything else to paint a sand-ish colour. Another question I have is if it's possible to use al_get_pixel on my canvas without making ALLEGRO_BITMAP canvas a global. I tried to use a reference but made it worse.

A C compiler wants the '0x' prefix to denote a hexadecimal representation. And binary integers are just bits, the 0xFFFF whatever, vs 45093 is just a convenience for the human reader.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

I did read that part in the manual but I noticed al_unmap_rgb(and the spin-offs) is void which confuses me on how I am supposed to retrieve the colour let alone compare it. Sorry if I am missing something here.

I used this to check for any colour other than black (all zeros which is transparent in my game). I'm looking for anything other than zero to show a collision (two coloured pixels occupying the same location on overlapping sprites). I chose memcmp(). This won't work in all circumstances, but it worked well here. ALLEGRO_COLOR simply holds RGBA values.

// sample a pixel from each object
pixel[0]=al_get_pixel(object1->img, (over_left-object1->x)+cx, (over_top-object1->y)+cy);
pixel[1]=al_get_pixel(object2->img, (over_left-object2->x)+cx, (over_top-object2->y)+cy);// We'll compare the memory of our pixels to our transparent structure and see if we have a// collision. If both memcmp() is true (non-zero) than we have a collision.if(memcmp(&pixel[0], &trans, sizeof(trans))&&memcmp(&pixel[1], &trans, sizeof(trans))){
collision=true;goto EXIT;}