Solved

VC++ 6.0: fatal error C1061: compiler limit : blocks nested too deeply

Posted on 2006-11-22
3
1,633 Views
Last Modified: 2013-11-20
Hi,

While compiling I'm ereciving "fatal error C1061: compiler limit : blocks nested too deeply".
It's due to more than certain number of if - else statement.

Can you plesae let me know how do we fix that. It's urgent and I appreciate ealry reply reply.

Thanks
0
Comment
Question by:pbsmbc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
bdunz19 earned 500 total points
ID: 17998093
Hey pbsmbc,

MSDN says your up you know what creek (and you have no paddle)! If you go to:

http://msdn2.microsoft.com/en-gb/library/dcda4f64(en-us).aspx

You will see that you've reached the maximun nested blocks. My sugestion - well I've never seen a program with that many nested if's, ect - is to try to make some of your code into separate functions. Normally when somone has that many conditional statements, they have incorrectly structured their code and are not thinking modularly.

I'm willing to bet that if you look at your code, you have repeted sets of instructions. When you have that 9 out of 10 times, you can separate those blocks into a single function call.

Hope my comments will help you out and good luck,
Brandon
0
 
LVL 8

Expert Comment

by:YoungBonzi
ID: 18000389
Let's see your code, maybe we can help you rethink the logic.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 18001578
As bdunz19 says your design may be bad.
With nested if..else statements may you could achieve the same with a recursive function.  (Do you know what that is?)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
repeateFront java challenge 31 95
viewing source code from eclipse 13 110
countEvens challenge 2 115
bigDiff challenge 17 135
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question