q-bertsuit
Junior Member level 3
Hi guys,
I've been reading tutorials about C++ the last few days and been trying some of the stuff out. Now I thought I would try to write some bigger code and test out what I have learned. I have a little trouble deciding what approach to take.
I thought I'd try solving the Knight's tour Knight's tour - Wikipedia, the free encyclopedia.
My first thought is to use a linked list with 64 structures, were each part of the list contains an Xpos, Ypos and number of moves it has done from that particular position. The point is not to get the fastest solution, but to get it to work at all.
Is there any point using classes in this program? I'm pretty sure I could get it working if I spend enough time, but I would also like to do it properly to test what I have learned the last few days and to get in to good programming habits.
Thank you
I've been reading tutorials about C++ the last few days and been trying some of the stuff out. Now I thought I would try to write some bigger code and test out what I have learned. I have a little trouble deciding what approach to take.
I thought I'd try solving the Knight's tour Knight's tour - Wikipedia, the free encyclopedia.
My first thought is to use a linked list with 64 structures, were each part of the list contains an Xpos, Ypos and number of moves it has done from that particular position. The point is not to get the fastest solution, but to get it to work at all.
Is there any point using classes in this program? I'm pretty sure I could get it working if I spend enough time, but I would also like to do it properly to test what I have learned the last few days and to get in to good programming habits.
Thank you