title: How to create int that stores only 2 bits in C++?
body: <p>Is there a way how to create variable that can have only one of 3 values?</p>
  
  <p>I want to make a function that returns one of three possible states, I think that use of integer in this case would unnecessarily take lot of space in memory.</p>
  
  <p>So, is there any way how to create variable that stores only 3bits in memory and can be used as a return in function? If so please give me suggestion how to rewrite this into something better:</p>
  
  <pre><code>int ReturnOneOfThreeStates(){
       return 0 //Let's say 0=green, 1=red, 2=blue
  }
  </code></pre>