# Allegro Question (cursor)

## Recommended Posts

JakeDavis    127
Ok, ive been messing with allegro lately, and im trying to learn more about the mouse functions, so far i havent had much luck. I tried setting a custom cursor, with:
show_mouse(screen);

BITMAP *buffer = create_bitmap(640, 480);  //dk if i even need this line

void set_mouse_sprite(BITMAP *crosshair);
But it didn't work, any suggestions? And one more question, how would i make it so that i can have a GUI in Allegro, like a game menu, or would i have to use something different then allegro. Thanks FOr any help! (what i was using: http://alleg.sourceforge.net/stabledocs/en/alleg004.html)

##### Share on other sites
Zao    970
One of your lines is a function declaration. Guess which one.

##### Share on other sites
JakeDavis    127
void set_mouse_sprite(BITMAP *crosshair);

i think...

But how do i fix it, if i take out void, i get an error.

##### Share on other sites
nobodynews    3126
A good first step would be to read up on functions again, but quickly:
a function declaration:void set_mouse_sprite(BITMAP *crosshair);a function definition:void set_mouse_sprite(BITMAP *crosshair){  // stuff}a function call:set_mouse_sprite(crosshair);

Compare and contrast.

##### Share on other sites
JakeDavis    127
ooooooo, got it now, thanks dude!