Open OoKurumi opened 3 years ago
文档里面CPP合约开发Map部分的示例中 char mapName[] = "students"; bcwasm::db::Map<mapName, std::string, Student_t> students; 这里students map应该定义在合约类中 否则在调用时,find、insert等方法中用到的3个wrappername不会进行初始化,为空值。导致key值与调用迭代器时访问的key不一致,导致无法找到key 希望将文档示例可以修改下
char mapName[] = "students"; bcwasm::db::Map<mapName, std::string, Student_t> students;
https://platonenterprise.github.io/#%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C/%E5%90%88%E7%BA%A6%E5%BC%80%E5%8F%91/%E5%90%88%E7%BA%A6%E5%BC%80%E5%8F%91-cpp%E5%90%88%E7%BA%A6%E5%BC%80%E5%8F%91/#structmap
文档里面CPP合约开发Map部分的示例中
char mapName[] = "students"; bcwasm::db::Map<mapName, std::string, Student_t> students;
这里students map应该定义在合约类中 否则在调用时,find、insert等方法中用到的3个wrappername不会进行初始化,为空值。导致key值与调用迭代器时访问的key不一致,导致无法找到key 希望将文档示例可以修改下