标签:double include air code typedef auto str using insert
#include <iostream> #include <map> using namespace std; typedef struct alertInfo { double alertUp; double alertDown; alertInfo(double up, double down) { alertUp = up; alertDown = down; }; } alert; int main() { map<int, alert> alert_map; for (int i = 0; i < 10; i++) { alert_map.insert(pair<int, alert>(i, alert(240 * i, 200))); } for (auto it = alert_map.begin(); it != alert_map.end(); ++it) { cout << it->first << " - > " << it->second.alertUp << endl; } }
标签:double include air code typedef auto str using insert
原文地址:https://www.cnblogs.com/zhaopengpeng/p/13393347.html