title: C++ Disable C1061 error - blocks nested to deep?
body: <p>I'm working with an opensource project(a server) and basically on start it loads a big xml item database, with hundreds of item attributes. It uses a massive amount of else/ifs to check for these attributes, I've taken the liberty of adding about 20 more, and now it seems that I've broken the compiler. I've searched around and none of the answers I've found actually give me a viable option so I'm just wondering if you can disable this, I've tried using #pragma (as they use this on a few other warnings themselves).
  I haven't had much experience with this part of C++ so I'm probably doing it wrong.</p>
  
  <pre><code>#pragma warning(disable:1061)
  </code></pre>
  
  <p>is what I tried, didn't work gave me and error that its not a valid warning. Is it possible to disable this error?</p>
  
  <p>Thank you.</p>
  
  <p>//Edit - Solution
  Just wanted to add how I worked around this. I ended up creating a function that I put all my custom attributes in so I wouldn't pass the 128 level limit.</p>
  
  <pre><code>bool isCustomAttribute(std::string strValue, int intValue, xmlNodePtr itemAttributesNode, ItemType&amp; it)
  </code></pre>
  
  <p>and I inserted into the array of else ifs lol, maybe not pretty but it was a quick and easy work around.</p>