有需要快速查找的数时可以用map
std::map<std::string, cv::Point3d> all_gps_data; std::map<std::string, cv::Point3d>::iterator iter_ = all_gps_data.find(image_name); if(iter_ != all_gps_data.end()) { current_gps=iter_->second; }
2023-10-29 12:35:46
有需要快速查找的数时可以用map
std::map<std::string, cv::Point3d> all_gps_data; std::map<std::string, cv::Point3d>::iterator iter_ = all_gps_data.find(image_name); if(iter_ != all_gps_data.end()) { current_gps=iter_->second; }