This is my latest C++ project… made it purely for learning purposes, but it is kinda cool, I guess.
It is a windows port of Unix program Fortune.
The original implementation used files. My version uses SQLite with all the original quotes and fortunes, plus most posts from Evilzone irc quote thread :P
The usage is simple, just run the program to get a random entry. Output can be controlled with program args:
EvilFortune.exe [-h] [-l [-n]] [-s [-n]] [-w] -h -- Print this help screen -l -- Use only quotations longer than the length specified with -n, or 160 characters if -n is not used -s -- Use only quotations shorter than the length specified with -n, or 160 characters if -n is not used -n -- Override the length used by -l and -s to determine "long" and "short" messages (default 160 characters) -w -- Wait for a user input before terminating
Now be careful limiting number of chars with -n switch. If you give too few or too many, then the program will be stuck in an infinite loop. This is not a bug in the code.
Best to just leave -n switch out.