Does anybody know the limit of nested for loops in C or C++? If there is a limit, what is the reason?
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Recommended Answers
Jump to PostThere is a limit and it is big from memory but i cant tell you off the top of my head. It is to do with the stacks heaps and the like. You really want to have that many nested loops that you are worried about a limit?
Jump to PostIf there is a built-in limit in the C++ language, then hell is frozen over. There are practical issues -- you don't want to run out of memory or with two billion nested loops, each having its own counter variable, but the restriction there isn't from nested for loops, it's …
All 6 Replies
f1 fan
16
Posting Whiz in Training
Rashakil Fol
978
Super Senior Demiposter
Team Colleague
SpS
34
Posting Pro
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Rashakil Fol
978
Super Senior Demiposter
Team Colleague
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.