N-Queens problem with stacks

This is a discussion on N-Queens problem with stacks within the C++ Programming forums, part of the General Programming Boards category; I tried running the following code (all the couts are for error checking) and it outputs the same column number ...

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    1

    N-Queens problem with stacks

    I tried running the following code (all the couts are for error checking) and it outputs the same column number for each queen placed and it does rows 4,3,2,0. not 1 for some reason. This is the nqueens problem using stacks and backtracking. If someone could look over my code that would be VERY helpful, i'm kind of lost on this whole problem so the code may be a bit jumbled. Any suggestions would be helpful! I have only 2 more days to get this done and i'm confused about it. I attached the main program Queens.cpp and the Location.h and .cpp which is the object used to store the points of each queen object
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM
  2. ...multiplication using stacks
    By iiwhitexb0iii in forum C Programming
    Replies: 1
    Last Post: 10-09-2006, 02:28 AM
  3. stack and pointer problem
    By ramaadhitia in forum C Programming
    Replies: 2
    Last Post: 09-12-2006, 12:41 AM
  4. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM
  5. Problem using two stacks with following code
    By eurus in forum C Programming
    Replies: 3
    Last Post: 02-16-2006, 11:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21