[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-11-22
3
Medium Priority
?
1,729 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
3 Comments
 
LVL 4

Accepted Solution

by:
bdunz19 earned 2000 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 45

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month19 days, 14 hours left to enroll

872 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