fork download
  1. #include <iostream>
  2.  
  3. struct Money
  4. {
  5. int twenty, ten, five, one, change;
  6. int quarter, dime, nickel, penny;
  7.  
  8. void foo();
  9. };
  10.  
  11. int main()
  12. {
  13. char storage[120] = "This is filler.";
  14. Money* a = new (storage) Money; /* default initialization, not value initialization */
  15. std::cout << a->twenty << ", " << a->ten << ", " << a->penny << "\n";
  16. return 0;
  17. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1936287828, 544434464, 0