Click here to Skip to main content
15,891,633 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Deleting a File thru .EXE Pin
002comp2-Sep-09 19:30
002comp2-Sep-09 19:30 
AnswerRe: Deleting a File thru .EXE Pin
David Crow3-Sep-09 2:45
David Crow3-Sep-09 2:45 
AnswerRe: Deleting a File thru .EXE Pin
Hamid_RT3-Sep-09 3:37
Hamid_RT3-Sep-09 3:37 
QuestionExclude From Theming Pin
Kyudos2-Sep-09 14:50
Kyudos2-Sep-09 14:50 
AnswerRe: Exclude From Theming Pin
Joe Woodbury2-Sep-09 16:57
professionalJoe Woodbury2-Sep-09 16:57 
AnswerRe: Exclude From Theming Pin
Randor 16-Sep-09 2:17
professional Randor 16-Sep-09 2:17 
QuestionScramble game search help Pin
vtsmokey882-Sep-09 14:31
vtsmokey882-Sep-09 14:31 
AnswerRe: Scramble game search help Pin
Code-o-mat2-Sep-09 21:03
Code-o-mat2-Sep-09 21:03 
Use the "trackback" algorithm. Start from the first letter, let's say, top-left, step to the first neighbouring letter, check your 2 letters in the dictionary, if it is there, store it, then from your second letter move to its first neighbour, now you have a 3 letter word, check it against the dictionary, now step to the first neighbour of the third letter, you have a 4 letter word, check it, and so on, you do this until you cannot step any further ahead, then comes the trackback part, you step back from the last letter to the "bafore the last" one, and take this letter's second neighbour and try to move forward until you get stuck again, then you step back again and take the next neighbour and so on...so you have to record your path as you move along and when you step back from a letter because you had no more neighbours to visit, you have to know which neighbour the letter was you stepping back from and you have to try to step onto the next neighbour. Once you walked all the possibilities and you get back to the very first letter of the track and cannot move to any neighbours anymore (since you tryed the all), you move to the next letter in the grid (so if your top-left letter was the root of your first track, tnen for example you move to the top-center letter and start the whole trackbacking again). When you run out of all the letters, you are done. I supose you are not allowed to use the same letters multiple time in a word, so every time you step ahead from a letter, you must ensure that you do not take a letter that is already in your current path.
So if i were you i would store more than just a letter in the grid, i would store a flag i would set to -let's say- 1 if the letter is already in the current path and back to 0 if it is not anymore, then when i am steping forward i could easily check what letters not to take. I would probably, to speed up things, also store for every cell a list of its neighbours as coordinates so when i take a letter i would know its neighbours.
In my path i would store the coordinates of the letters and the index of the next or current neighbour so when the step-back occurs i know where to continue.

I hope this is enough to do your homework. Wink | ;)

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: Scramble game search help Pin
vtsmokey883-Sep-09 5:04
vtsmokey883-Sep-09 5:04 
QuestionProgram that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr2-Sep-09 13:55
psychegr2-Sep-09 13:55 
AnswerRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 2-Sep-09 15:19
professional Randor 2-Sep-09 15:19 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr2-Sep-09 21:16
psychegr2-Sep-09 21:16 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 2-Sep-09 21:50
professional Randor 2-Sep-09 21:50 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr3-Sep-09 1:12
psychegr3-Sep-09 1:12 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 3-Sep-09 9:31
professional Randor 3-Sep-09 9:31 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr8-Sep-09 9:40
psychegr8-Sep-09 9:40 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 8-Sep-09 14:42
professional Randor 8-Sep-09 14:42 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr8-Sep-09 22:00
psychegr8-Sep-09 22:00 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr10-Sep-09 4:55
psychegr10-Sep-09 4:55 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 10-Sep-09 18:52
professional Randor 10-Sep-09 18:52 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr11-Sep-09 5:53
psychegr11-Sep-09 5:53 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 11-Sep-09 7:15
professional Randor 11-Sep-09 7:15 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr15-Sep-09 13:02
psychegr15-Sep-09 13:02 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
Randor 16-Sep-09 3:45
professional Randor 16-Sep-09 3:45 
GeneralRe: Program that uses LPT port to communicate with a circuit that programs a cpu! Pin
psychegr17-Sep-09 9:28
psychegr17-Sep-09 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.