FAQ for CS61 Treasure Hunt (9/1/16)
1. How do I get treasure 6 to not print out the number 6, before I get it to print out "sixty-one?"
Actually, we wanted you to print out "sixty-one" numerically, not in text!
Just for fun, there is a way to print out just the string sixty-one.
What we'd like to do is backspace over the 6 that treasure 6 prints by
default and then print out the string "sixty-one." It turns out you can
do that! Try running ./treasure 6 "^v^hsixty-one"
where ^v
means
Control-V` (ditto for `^h`). See if you can figure out why `Control-H
causes the cursor to back up!
2. I think I've found the greeting cat from treasure 2, but it just blats garbage out to my screen -- is there a way to get it to do something more useful?
Take a look at the string that you think you need to print out for to see the greeting cat. This should give you an idea of what format the string is. Try saving the ouput to a file and see if you can find a tool that will display the greeting cat.