fork(1) download
  1. #include <cstdio>
  2. #include <cassert>
  3.  
  4. class testClass {
  5. public:
  6. testClass() {
  7. puts("DxLib_Init");fflush(stdout);
  8. }
  9. ~testClass() {
  10. puts("DxLib_End");fflush(stdout);
  11. }
  12. void testFunction() {
  13. puts("testFunction Called");fflush(stdout);
  14. }
  15. };
  16.  
  17. int main(void) {
  18. int a=0;
  19. testClass tc;
  20. scanf("%d",&a);
  21. tc.testFunction();
  22. assert(a);
  23. tc.testFunction();
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 2684KB
stdin
10
stdout
DxLib_Init
testFunction Called
testFunction Called
DxLib_End