fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6.  
  7. std::vector<std::pair<double, std::pair<int, int>>> vec;
  8. int x=100, y=10, z=20;
  9. vec.push_back(std::make_pair((double)x,std::make_pair(y,z)));
  10. for(int i=0;i<vec.size();i++){
  11. std::cout<<"x: "<<vec[i].first<<"\n";
  12. std::cout<<"y: "<<vec[i].second.first<<"\n";
  13. std::cout<<"z: "<<vec[i].second.second<<"\n";
  14. }
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 4284KB
stdin
Standard input is empty
stdout
x: 100
y: 10
z: 20