Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am making a c++ program and when i try to run it ,it shows max. execution time exceeded. please tell what should i do?? Is this mean that the program i made will not work anywhere??
pls help.
thanks in advance.
Posted
Comments
Frankie-C 1-Mar-15 7:09am    
No magic here to see your system.
Provide info: what program, where it timeout, what it do, etc...
CPallini 1-Mar-15 10:20am    
Please elaborate.

1 solution

Most likely you have an infinite loop in your code.
Look for while and do-while loops without or with faulty break conditions.
Put a breakpoint inside each and step through the code.
For loops usually have a counter, so normally not a problem.

Without you showing your code it is impossible to give a better answer.
 
Share this answer
 
Comments
Albert Holguin 1-Mar-15 14:43pm    
...although you can easily make infinite for() loops as well too...unfortunately.
George Jonsson 1-Mar-15 21:00pm    
True, but beginners usually use <pre lang="c">for (int i=0; i<10; i++)</pre>.
However, a lot of the times they copy code too, so you have a valid point.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900