Sign in to follow this  
peb

warning: assignment makes pointer from integet witout a cast...... WTF?

Recommended Posts

i have this in the globals: SDL_Surface *tiles[3]; and a bit down i have this: tiles[0] = LoadBMP("gfx/water.bmp"); tiles[1] = LoadBMP("gfx/desert.bmp"); tiles[2] = LoadBMP("gfx/grass.bmp"); on these three tiles[x] lines i get that warning: game.c:18: warning: assignment makes pointer from integer without a cast game.c:19: warning: assignment makes pointer from integer without a cast game.c:20: warning: assignment makes pointer from integer without a cast whats up with that?

Share this post


Link to post
Share on other sites

$ gcc implicit.c
$ gcc implicit.c -Wall
implicit.c: In function `main':
implicit.c:4: warning: implicit declaration of function `exit'
$ mv implicit.c implicit.cpp
$ g++ implicit.cpp
implicit.cpp: In function `int main()':
implicit.cpp:4: error: `exit' undeclared (first use this function)
implicit.cpp:4: error: (Each undeclared identifier is reported only once for
each function it appears in.)
$ cat implicit.cpp
/* no includes! */

int main() {
exit(0);
}

Language differences.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this