the cobalts haven't been around really long enough to know their longevity, however they are basically the new Cavaliers, that did NOT have a good track record, GM cars in general don't have a strong heritage for long lasting 
My suggestion would by an 06 Subaru Impreza, not a WRX or STi, just a base model RS, or something similar, I have a 93 Impreza with 230k miles on it that has never given me an issue. 
Honda's and Toyotas are good also, however I have never heard one person personally say they had a problem with their subaru, I once knew a guy who had on old Legacy, he called it his Moon car, because technically he had driven to the moon and back with it on the original motor, had about 550K miles on it, 
However, if you service your car correctly, treat it nicely, drive decent, most all cars will last a long time.