Question: how to cast to int
Open
- Dominant language
- C++
- Stars
- 39.4k
- Forks
- 8.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I have following map
```cpp
std::map 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
```cpp
leveldb::Iterator* it = db->NewIterator(leveldb::ReadOptions());
for (it->SeekToFirst(); it->Valid(); it->Next()) {
db.insert(
{
it->key().ToString(),
it->value()
}
);
}
assert(it->status().ok());
```
which get the key as string, then get the value. my question how do I can cast back the "value" to int?
Contributor guide
Assessment
This issue has not been assessed yet.