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

Join 109,295 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 1,224 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

 
Reply to this topicStart new topic

n queens, n>=9 program terminates

aclark17
post 2 Jul, 2008 - 02:05 AM
Post #1


New D.I.C Head

*
Joined: 18 Jun, 2008
Posts: 9

I cant figure out why this program is terminating and where exactly .. I have defined class to find all solutions to the n queens problem recursivley using the backtracking algorithim.
For n>n, specifciy n=9...it appears as if the program exits on its own.
see attachment.


This post has been edited by aclark17: 2 Jul, 2008 - 02:41 PM


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

Go to the top of the page


captainhampton
post 2 Jul, 2008 - 05:51 AM
Post #2


D.I.C Addict

Group Icon
Joined: 17 Oct, 2007
Posts: 501



Thanked 2 times

Dream Kudos: 775
My Contributions


It seems that some of the function implementation from your code is missing, i.e. RemoveQueen, SetQueen, etc. It is hard to tell just based on this why it is reacting as such. Also please put your code between the "[code]" brackets.

This post has been edited by captainhampton: 2 Jul, 2008 - 05:51 AM
User is offlineProfile CardPM

Go to the top of the page

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

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