
anagram solver
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This is a simple anagram solver.
You can use it against any spelling dictionary that is formatted:
*one word per line
*in alphabetical order
if its not in alphabetical order, you could send it through pipe.
The basic algorithm tries all possible combinations of a word, in such a way that the combinations are generated in alphabetical order. It also knows the next real word in the list, so it can tell whether or not it is futile to pursue a certain node. These optimizations make it possible for it to solve a 8+ letter word in a few seconds
To use it, simply point it to your aspell dictionary file, usually located in /usr/share/dict/linux.words
hifi25nl
14 years ago
------------------------------
Making all in src
make[3]: Entering directory `/home/olmeda/Downloads/Anagram/anagram-01/src'
if i486-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/sha
re/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-
long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE
=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-secu
rity -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -MT m
ain.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"
; exit 1; fi
if i486-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/sha
re/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-
long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE
=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-secu
rity -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -MT a nagram.o -MD -MP -MF ".deps/anagram.Tpo" -c -o anagram.o anagram.cpp; \
then mv -f ".deps/anagram.Tpo" ".deps/anagram.Po"; else rm -f ".deps/ana gram.Tpo"; exit 1; fi
In file included from anagram.cpp:26:
anagramwidget.h:25:31: error: anagramwidgetbase.h: No such file or directory
anagram.cpp:38:23: error: anagram.moc: No such file or directory
anagramwidget.h:28: error: expected class-name before '{' token
anagramwidget.h:32: error: 'WFlags' has not been declared
anagramwidget.h:28: warning: 'class anagramWidget' has virtual functions but non -virtual destructor
anagram.cpp: In constructor 'anagram::anagram()':
anagram.cpp:31: error: no matching function for call to 'anagram::setCentralWidg et(anagramWidget*)'
/usr/share/qt3/include/qmainwindow.h:78: note: candidates are: virtual void QMai nWindow::setCentralWidget(QWidget*)
make[3]: *** [anagram.o] Error 1
make[3]: Leaving directory `/home/olmeda/Downloads/Anagram/anagram-01/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/olmeda/Downloads/Anagram/anagram-01'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/olmeda/Downloads/Anagram/anagram-01'
make: *** [build-stamp] Error 2
----------------------------
Some hints?
Piero
Report