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.