Great idea Kurt. I'm not totally down with two-dimensional arrays but I'll read up on it and give it a shot soon.
Edit: By the way Kurt, would some sort of hash set be preferrable to an array or...
Type: Posts; User: lonkz
Great idea Kurt. I'm not totally down with two-dimensional arrays but I'll read up on it and give it a shot soon.
Edit: By the way Kurt, would some sort of hash set be preferrable to an array or...
Thank you tabstop. That seems to do the trick.
I never knew about the rewind function. Guess I didn't do my homework... for shame!
Anyways it works perfectly every time now and even a little...
I tried initialising the stream in the main method just once before calling any functions and that results in only one anagram being printed. This caused me to draw the assumption that every time I...
Many thanks to everyone who helped me. The application now works great and fast for smaller words. However it doesn't seem to like more than 5 characters. I get some pretty weird results.
Here is...
Oh yeah, nicely spotted. I seem to have been looking at the old code originally posted frantically trying to figure out where I made the mistake.
Well needless to say it has been corrected. Thanks...
I didn't realise I was doing that. Could you point out where?
Thanks a lot to all of you. It finally works!
I don't know if the thread is now closed or if people would like to help do a bit of optimization. It seems awfully slow with words over 4 characters....
Oh cool thanks Kurt.
I tried doing something along the lines of
// check current permutation against entire dict.txt
void checkDict(char *str){
while(fgets(temp, MAX_DICT_LEN, dict) !=...
Thanks a lot MK27. It runs without crashing now.
I still can't get it to work though. If I pass a permutation of a word I know is in the dict.txt file, or even the word itself, it doesn't print...
Hello.
I'm making a small application to make permutations of strings in order to find any anagrams. These permutations are then checked against a dictionary file using fgets. It compiles nicely but...