title: c++ singlton vs static class vs extern vs namspace
body: <p>so I'm trying to make my own simple 2d game engine for the first time and I have some objects which I only need one instance of them like "Window" and "Event" for example and I've seen different ways to make it so only one instance of an object is valid at a given time so there is no need to pass pointers and refrences and stuff everywhere and get the code messy...
  so from what I've seen so far there is 4 ways to do it :
  using singlton or static class or extern object or a static object inside a namspace
  my questions are:
  what should I use ?
  when to use anyone of them and what is a good and bad practice ?
  thanks in advance and sorry if my question is a bit silly</p>