Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 109,296 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 1,214 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



n queens c++

 
Reply to this topicStart new topic

n queens c++, n>=9 program terminates

aclark17
post 2 Jul, 2008 - 02:43 PM
Post #1


New D.I.C Head

*
Joined: 18 Jun, 2008
Posts: 9

Works great for n<9, cant seem to figure out whats causing the program to exit without error message for n>=9. see attachment for source code.


Attached File(s)
Attached File  code.txt ( 1.66k ) Number of downloads: 15
User is offlineProfile CardPM

Go to the top of the page


skaoth
post 2 Jul, 2008 - 10:29 PM
Post #2


D.I.C Regular

Group Icon
Joined: 7 Nov, 2007
Posts: 323



Thanked 5 times

Dream Kudos: 100
My Contributions


The problem you are having is that the number of recursion stacks you are accruing is causing the program to crash. From what I've been able to see you have called solve() recursively about 4300+ times by the time it crashes. During this whole time you have never returned from any of the recursive calls.

User is online!Profile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 9/6/08 09:40AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month