fork(7) download
  1. #include <vector>
  2. #include <iostream>
  3. class a {
  4. float x,y,z;
  5. public:
  6. a(float a, float b, float c) : x(a), y(b), z(c) {}
  7. };
  8. int main()
  9. {
  10. std::vector<a> b;
  11. b.emplace_back(0, 0, 0);
  12. b.push_back(a(0, 0, 0));
  13.  
  14. std::cout << "b contains " << b.size() << " elements\n";
  15. }
  16.  
Success #stdin #stdout 0s 2964KB
stdin
Standard input is empty
stdout
b contains 2 elements