#173682 - jam_888 - Fri Apr 23, 2010 9:00 am
Ok, so i made this game anyway i needed a few classes and stuff anyway of course i have functions in it. My pronlem is that i have a void function in my player class and it come's up with this error
error C2062: type 'void' unexpected
.Now i have no idea what this mean's as i declared it in the player header file so it should work and i have used classes before and this is the first time it has happened. I am guessing it has something to do with allegro cause that is the only thing i can think of.
Please help?
edit: here is the code in my player.cpp file
_________________
i'm in the corner of your eye were you never want to look http://www.mediafire.com/?noymnnmtwmm
error C2062: type 'void' unexpected
.Now i have no idea what this mean's as i declared it in the player header file so it should work and i have used classes before and this is the first time it has happened. I am guessing it has something to do with allegro cause that is the only thing i can think of.
Please help?
edit: here is the code in my player.cpp file
Code: |
#include "player.h" int x = 10; int y = 10; player::player(): void player::move() { install_keyboard(); while ( !key[KEY_ESC] ){ clear_keybuf(); acquire_screen(); textout_ex(screen, font, "I mixed a few different tutorial's together to make this arrow's = move", 1, 12, 11, -1); if (key[KEY_UP]) --y; if (key[KEY_DOWN]) ++y; if (key[KEY_RIGHT]) ++x; if (key[KEY_LEFT]) --x; textout_ex( screen, font, "@", x, y, makecol( 255, 0, 0), makecol( 0, 0, 0) ); release_screen(); rest(20); } } |
_________________
i'm in the corner of your eye were you never want to look http://www.mediafire.com/?noymnnmtwmm