fork download
  1. #include <iostream>
  2.  
  3. struct type {
  4. int * const ptr = new int(42);
  5. };
  6.  
  7. int main() {
  8. type object;
  9. std::cout << *(object.ptr) << std::endl;
  10. }
  11.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
42