it works now. the results are identical to right.txt. thanks for your help

one more thing, though. i can output through the console fine. but when i replace the cout arguement with myn. in detail:
Code:
ofstream myn("textout.txt",ios::binary);
table->print(myn);
myn.close();
as you can guess, print(myn); goes to void print(ostream& out)
for some reason, though, in the end there's the file "textout.txt" but there's nothing in it. it's size is 0. void print()'s only change was changing the int value to an unsigned char.
any ideas?