Cody is about 50 miles from the East Entrance to Yellowstone. In Cody be sure to visit the Buffalo Bill Historical Center. For a list of other things to do: http://www.tripadvisor.com/Attractions-g60442-Activities-Cody_Wyoming.html
for restaurants: http://www.tripadvisor.com/Restaurants-g60442-Cody_Wyoming.html
sorry don't know how to do the clicky.
We stayed at The Yellowstone Valley Inn on the Hwy between Cody and Yellowstone. "ok" park closer to Yellowstone but farther from Cody. About 30 miles to Yellowstone entrance. We drove to Yellowstone during the day and returned to the RV at night. They have a restaurant on site. There is also the Buffalo Bill State Park along the same road along the reservoir from the dam. No full hookups but beautiful area and more remote but closer to Yellowstone.