[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2006-11-22
3
Medium Priority
?
1,708 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 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

656 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