title: C++, checking if a variable is initialized when I can't use NULL/0
body: <p>I need to check if a variable is initialised. I am new to C++ so perhaps I am thinking about this in the wrong way. I want to do the following:</p>
  
  <pre><code>if (variable) {
      // do some stuff
  }
  </code></pre>
  
  <p>My first thought was to set the value to NULL at declaration. However, it turns out NULL is identical to 0 in C++. Unfortunately my variable is a double that can be 0. The solutions I could find online are all regarding pointers and just say to use nullptr but this is not possible in my case of course.</p>
  
  <p>What alternatives do I have here?</p>