I tried using GDB for my Game of Fifteen but I can't get to the part of functions move and won because GDB stops when command line asks for tile to move. This has something to do with GetInt. GDB stops so I had to quit everytime. What should I do to get past GetInt? enter image description here

  • Did you enter a tile number when it asked for the tile to move?
    – kzidane
    Jun 26, 2014 at 9:37
  • gdb stops after printing tile to move so even after typing a number/tile nothing happens
    – user261819
    Jun 26, 2014 at 9:39
  • You may either copy and paste the error message that gdb prints on exiting or take a screenshot and add it to your question!
    – kzidane
    Jun 26, 2014 at 9:41
  • May I know why the line 91 (prompt for move) has no "//" at the front? Is it a comment or part of the program? Its absence may cause the program to stop.
    – Doufulai
    Jun 26, 2014 at 12:50
  • It's a comment and it has "//" when I checked it on gedit. It doesn't appear though when I used GDB.
    – user261819
    Jun 26, 2014 at 13:08

2 Answers 2


I just solved this problem. I watched a GDB short by Nate Hardison from previous lectures and I found out that we were running a different command for using GDB. For Game of Fifteen, I was using "gdb -tui fifteen" which I saw on some lectures too but Nate used "gdb ./fifteen". When I tried Nate's, my GDB doesn't stop anymore. I can now type a number when "Tile to move:" appears. Thanks though to all who spent time providing answers to my questions.

  • Then you should mark the question as solved.
    – rigel
    Jun 27, 2014 at 14:55

You have to enter ur choice ie tile which u wish to move

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .