I have to save an increasing ID as key into a levelDB database. So what I get (and what I have to give to levelDB) is a string.
Question: Is there an elegant way to increase a number saved in a string?
Example:
std::string key = "123";
[..fancy code snipped to increase key by 1..]
std::cout << key << std::endl; // yields 124
Cheers!
PS: Would prefer to stay with standard compilation, i.e. no C++11.
You can also do it using c style casting: