C++ if statement alternatives
<p>Is it me, or does it seem like C++ asks for more use of the 'if' statement then C#?</p>

<p>I have this codebase and it contains lots of things such as this:</p>

<pre><code>if (strcmp((char*)type,"double")==0)
</code></pre>

<p>I wondered isn't it a bit of a 'code smell' when there's just too many if statements?</p>

<p>I'm not saying there bad, but things like string comparisons, with lots of strings involved, can't they be done differently?  </p>

<p>Is there an alternative to just writing sequences of if statements?</p>

<p>THIS IS JUST AN EXAMPLE, IT CAN BE ANY KIND OF IF STATEMENTS
instead of:  </p>

<pre><code>if (string a == "blah") then bla
if (string b == "blah") then blo
</code></pre>
