fork download
  1. #include <iostream>
  2.  
  3. struct A {
  4. A() {
  5. std::cout << "A was created" << std::endl;
  6. }
  7.  
  8. void kukareku() const {
  9. std::cout << "kukareku" << std::endl;
  10. }
  11.  
  12. ~A();
  13. };
  14.  
  15. A::~A() {
  16. std::cout << "A was destroyed" << std::endl;
  17. }
  18.  
  19. int main() {
  20. A().kukareku();
  21. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
A was created
kukareku
A was destroyed