fork download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. struct X{
  5. X(int i, float f, bool b){
  6. std::cout << "X(" << i << ", " << f << ", " << b << ")\n";
  7. }
  8. };
  9.  
  10. int main(){
  11. std::vector<X> vx;
  12. vx.emplace_back(42, 3.14f, true);
  13. }
Success #stdin #stdout 0s 2960KB
stdin
Standard input is empty
stdout
X(42, 3.14, 1)