Example code not working (wire.write and wire.read)

Perhaps you have an old copy of the Wire library somewhere. "As of Arduino 1.0, the library inherits from the Stream functions, making it consistent with other read/write libraries. Because of this, send() and receive() have been replaced with read() and write()."

Check the "libraries" folder in your sketch folder to make sure you don't have an old Wire library.