fork download
  1. class StrongInt
  2. {
  3. int value;
  4. public:
  5. explicit StrongInt(int v = 0) : value(v) {}
  6. operator int () const { return value; }
  7. };
  8.  
  9. int main()
  10. {
  11. StrongInt x0(1); //construct it
  12. auto x1 = new StrongInt[100000]; //construct it without initialization
  13. auto x2 = new StrongInt[10](); //construct it with initialization
  14. return 0;
  15. }
Success #stdin #stdout 0s 3348KB
stdin
Standard input is empty
stdout
Standard output is empty