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
?
-
Did you enter a tile number when it asked for the tile to move? – Kareem♦ Jun 26 '14 at 9:37
-
gdb stops after printing tile to move so even after typing a number/tile nothing happens – user261819 Jun 26 '14 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! – Kareem♦ Jun 26 '14 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 '14 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 '14 at 13:08
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.