Let's say you have a base class that is going to be the value for a node in your linked list
However, when you need to do a specific operation in the loop of the linked list you need a variable that's in the derived class, say a bullet.Code:struct Entity { int x, int y; };
I can write and read to this variable from downcasting, but immediately after the program crashes. If you need the full source here it is: [C Intermediate Language] #include <SDL.h> #include <SDL_image.h> typedef enum Type { PLAYER1, PL - Pastebin.com. If you have any other criticisms of the code feel free to share: I'm very new to C. ThanksCode:((Bullet*) (&tmp->e))->lifeTime