Answer to Question #17476 in C++ for chris lechat

Question #17476
pretty easy question here for you guys

if you have the function

function() {
x := 1

if (x == 1) {
function()
}
return
}

that would obviously create an infinite loop but will it eventually cause problems by having an infinite amount of functions inside functions?

the code is written for autohotkey but it should be close enough to c++ for it to make sense
thank you for your time
1
Expert's answer
2012-10-30T11:28:49-0400
void function() {
intx = 1;
if(x == 1) {
function();
}
return;
}
Call of function will cause the next error :
Unhandled exception at 0x002643F9 in Number Processing.exe:0xC00000FD: Stack overflow (parameters: 0x00000001, 0x00432F3C).

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS