Just got back into C++ a couple months ago. Mainly, my plan is to get into game development. Hard field to get into, I know, but through school and a hopeful internship this summer, I will be able to fight my way in. I am currently learning SDL and I think I am ready to start developing my first game. Just to get a feel of it and learn how to effectively layout my classes, I am doing a simple game, probably just Black Jack. Anyway, my questions that have to do with C++. Sorry if these are stupid questions; I have been learning on my own which is sometimes hard.
I know it is bad coding to have global variables for the most part, but how exactly do you replace them? I have many different variables that are called by a bunch of different classes and functions, like the screen width, height, and bpp. Someone recommended using singleton classes. I really don't know what singleton classes are. After doing a bunch of research, I think it means to have a class with private static variables and functions with the class calling it's own constructor, or something like that... I also ran into people saying singleton classes are just as dangerous as global variables and are not a good replacement. Can someone please clear these up for me?