I have a binary search tree and need to output it before it clears to create the next one. I can output strings in the main but can't figure out how to put anything dealing with the tree to the outputted text file. Here's my code, please help, hehe. Thanks
I'm a little unclear about some of the specifics of your data, and what sort of fuctionality's your accomplishing, however I created a file "Latin.txt" with the following entries:
%casa:home %uno ne %dose:two
Then with this method below I create similiar output to what you have in "Latin.txt". The current positioning of your output to the console will not be the same as your output written to file "Output.txt" until you adjust the logic. There are other ways of accomplishing writing to files, such as using channels. Anyhow this is one way of accomplishing this, but I would personally utilize the channels from java.nio ... I'm sure there are tutuorials out there to review...
P.S. I was never prompted for input from your variable 'stdin' (no stdin.readLine()) which leads me to believe that your program is still being refined...
Thanks for your help Jimmy Your suggestion unfortunately didn't work either. Sorry for the very vague question and sloppy code. I was in a hurry and didn't have too much time to do anything I ended up appending the text file and it kind of worked. It would output to the console perfectly, but the output to the text file was all screwy, but at least it outputted something The program was turned in today and I can post the results on how to make it work if anyone cares to see, hehe. Thanks again, Adam
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth