fork download
  1. #include <stdio.h>
  2.  
  3. class TestClass {
  4. public:
  5. TestClass()
  6. { printf("A created\n"); }
  7. void printContents()
  8. { printf("Int: %d\nFloat: %f\n", v1, v2); }
  9.  
  10. private:
  11. int v1;
  12. float v2;
  13. };
  14.  
  15. TestClass getRandomClass() { }
  16. int getRandomNumber() { }
  17.  
  18. int main(int argc, char **argv)
  19. {
  20. TestClass a = getRandomClass();
  21. a.printContents();
  22. printf("%d, %d, %d, %d\n" , getRandomNumber(), getRandomNumber(), getRandomNumber(), getRandomNumber() );
  23. return 0;
  24. }
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
Int: 0
Float: 0.000000
0, 0, 0, 0