Around 50 years ago, I read a book about an advanced society where the tech community had learned how to connect the brain's sensory inputs to a computer that would generate the correct neurological signals so as to put anyone in a virtual reality that was indistinguishable from the real reality. The physical body wold be put on some sort of suspended animation until the adventure was over and the person would be put back together.

Everyone's goal was to earn enough "credits" to go on one of these virtual adventures. The virtual reality companies had a library of scenarios that would make you the protagonist of a lifestyle of your choice. You could be a cowboy, a movie star, a Nobel Prize winner, a military hero, a gangster, a famous playboy, and so forth.

I cannot for the life of me recall the title of the book. I would be grateful for any help.

Thanks, CM