I see that you put Beam *pBeam=NULL; in your main() function. This does not mean that pBeam is now going to be a global variable that everything can use. I made a really crappy 2D batman game in OpenGL and having a clean layout is key and that pretty much means make a bunch of files that divide your program into sections (I see you did that with your class and that is a good start).
Anyways you should be able to fix the problem you have by declaring pBeam in a global scope (by declaring it outside of functions at the top of your file).
If you run into any other problems feel free to ask.
I totally agree that making everything global is a really poor way of coding but for projects like this where you are going to have your primary elements of the game being used lots you might as well make it global since you know you will be using it all the time.
If you have another way of doing it I too would like to see.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"