Kiwirider is spot on.
At 5'10" you'll probably be looking for something marked as a 17" or 18", but due to different geometries, and measuring protocols, these sizes are guides only. I believe that most people fit between two frame sizes, for aggressive off-road work, the smaller bike will always be better, for long distance back-country riding or loaded touring, the longer frame is often better. Generally smaller is better, as long as you can turn the bars without smacking your knees into them and you don't require a seatpost longer than 400mm to get full extension, things should be all good. It's the effective top tube length (the imaginary line that runs from the centre of your headstem to where it meets the centre of the seat post) that is the most critical. Too long and your stretched out to far to be able to move around on the bike, to short and you'll be cramped, with knees where they shouldn't be and the risk of a sore neck and shoulders.
There's no such thing as the right bike for a given height. I'm almost exactly the same total height as a friend of mine, but I'm all legs and he's all torso. I can ride a smaller frame more comfortably than him, but my seat is always higher.