There are no forbidden characters. However, you might have difficulty with characters such as \r and \n, since they're interpreted as "I'm done" when you type a string, and as terminator when reading from a file. $ works just fine (let me try right now just to double check... yes, it works).
Interesting characters that might cause trouble are non ASCII characters. For instance, depending on whatever terminal you're using, characters such as é will be represented differently (ie, if the terminal is using UTF-8, UTF-16, other Unicode, or some obscure encoding). So unless you're always using the same computer, you should avoid these characters.
0 may also be a bother, since it means end of string in C.
Of course, remember to quote/escape as appropriate for your shell if you specify a password using a shell.
There is no length requirement (within reason - don't go using 4 billion character password or you'll run out of memory, and there might be a standard C++ library string limit, but if there is, it's likely pretty high).