i've done the cout thing
Its my favorite method just cause no one ever taught us how to use the debugger.
if anyone could point me towards a good codewarrior tutorial, that would be a great help.
As for posting my code, i'd rather not, its like 40 pages, and its impossible to understand unless you thoroughly understand the algorithm. I feel sorry for my teacher, who has to grade it.
basically, it is sposed to compress text files in a simulation of bits. As and Bs are used as bits.
1) It reads a file into a linked list where each node just contains a char and an int.
2) it is given a pattern length to search for. It divides the list into each section of that length. So a file of 1000 characters would be divided into 250 patterns, and put in a pattern list (which is basically just a list of chars within each pattern node)
3) It searches through each pattern to find which ones match. the matching ones are given a matching reference number, or index.
4) all distinct patterns are written to a new file in the order that they were indexed.
5) the list of indexes is written.
so basically heres a sample:
give a length of 3, and here is output:
some other numbers are written to help decode this, including length of patterns, number of distinct patterns, and number of total patterns.
if you would like to look at the entire code, email me... MunkiRench@gmail.com
thanks for all your help...