摘要: 声明为pair类型的变量可以有三种赋值方法:1. 通过初始化赋值 直接声明的时候 后面加括号并且数据,如下a2. 通过.first .second 来赋值 如下b3. 通过 = make_pair() 来赋值, 如下c a. pair product1 ("tomatoes",3.25); pair product2; pair product3; b. product2.first = "lightbulbs"; // type of first is string product2.second = 0.99; // type of second i 阅读全文
posted @ 2012-11-29 20:09 剑不飞 阅读(651) 评论(0) 推荐(0) 编辑