小编use*_*553的帖子

std::map<struct,struct>::find 没有找到匹配项,但是如果我通过 begin() 循环到 end() 我会在那里看到匹配项

struct chainout {
    LONG cl;
    std::string cs;
    bool operator<(const chainout&o)const {
      return cl < o.cl || cs < o.cs;
    }
  } ;
  struct chainin{
    std::string tm;
    std::string tdi;
    short mss;
    LONG pinid;
    bool operator<(const chainin&o)const {
      return  mss < o.mss || pinid < o.pinid || tm<o.tm; //no tdi right now it's always empty
    }
  };
  std::map   <chainin,chainout> chainmap;
  std::map<chainin,chainout>::iterator it;
  chainin ci;
  chainout co;


 string FADEDevicePinInfo::getNetAtPinIdTmTidMss (const LONG p,const string tm, const string tid,const LONG mss){

  ci.tm=tm;
//  ci.tdi=tid;
  ci.tdi=""; …
Run Code Online (Sandbox Code Playgroud)

c++ string struct dictionary find

3
推荐指数
1
解决办法
62
查看次数

标签 统计

c++ ×1

dictionary ×1

find ×1

string ×1

struct ×1