You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me, depend on how to you put data in LevelDB
if you put it as string (Ex. "1234" for 1234) then just convert parse it bact it int
if you put it as int32_t's binary (Ex 00 00 00 0F for 15) then just cast to back from string.data() to int32_t* and then copy to any where you like.
you simply can't do this unless you cast or decod which is not recommended in many cases espically if you are sending this through and responce it is better to be bytes and then casted in the presentation layer
Hi, I have following map
std::map<std::string, int> db;
which in future, I want load data from leveldb to the memory by looping all of keys and insert to the std::map, I was do this
which get the key as string, then get the value. my question how do I can cast back the "value" to int?
The text was updated successfully, but these errors were encountered: