Solved

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

Posted on 2006-11-22
3
1,663 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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