How to make an inanimate object track a rigged character?

For instance, how can I make a rigged character hold and move a cup or glass and have it move with their hand?

thanks

here’s a couple more…

here’s a thread about this very subject… very good read…