fork(1) download
  1. #include <iostream>
  2. #include <memory>
  3.  
  4. class Widget {
  5. public:
  6. Widget(int, int) { }
  7. };
  8.  
  9. int main() {
  10. const std::size_t number_of_widgets = 2;
  11. std::unique_ptr<Widget[]> widget(new Widget[number_of_widgets]{Widget(1, 2), Widget(3, 4)});
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 3224KB
stdin
Standard input is empty
stdout
Standard output is empty