Reputation: 0 Apprentice
- Active Posts:
- 24 (0.05 per day)
- 30-January 13
- Profile Views:
- Last Active:
- Apr 07 2014 03:41 PM
- Dream Kudos:
Posts I've Made
Posted 23 Feb 2014Yes that makes sense now. I thought since I was using it that I had to include it, but I don't.
Posted 23 Feb 2014Can you explain where this is happening in the code and why?
OK. So my code does work. But I was including the file.
Which apparently is why it wasn't working. It works when I removed it.
Thank you all for your help. I really appreciate it.
Posted 23 Feb 2014It is in the same directory. I is indeed opening the file but is throwing errors about delimiters. For example in unix running with g++ :
wordlist2.txt: 498841:1: error: missing terminating ' character incumbent's ^ wordlist2.txt:498875:13 warning: missing terminating ' character [enabled by default] at your wits' end ^
And in visual studios:
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 14 error C2146: syntax error : missing ';' before identifier 'mouse'
Posted 23 Feb 2014Thank you I used this code as a guide and it seems to work fine. Now I have to figure out how to create a list of all possible matches withing the trie. For example: if the input is "*a*", then I need to return a list of all matches in the trie, like: cat, hat, bat, can, ban ... all the words with an 'a' in the second position of the string with the string being 3 characters long. Any suggestions on how I could start? But thank you again I really appreciate it.
Posted 13 Feb 2014Can you be more specific of what's not working? Is it matching anything?
The one thing I do notice is that you need to use two slashes. "\w" makes the compiler think the w is something special like how "\n" is newline. The compiler will interpret "\\w" as "\w".
Wow that fixed it! I knew it would be something simple that I was overlooking. With the fix it returns only the 3 letter words with a in the middle.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Click here to e-mail me
mrm hasn't added any friends yet.