fork(11) download
  1. class base_class
  2. {
  3. public:
  4. int x;
  5. void function(base_class){}
  6. } base_1;
  7.  
  8. class derived_class: public base_class
  9. {
  10. public:
  11. int y;
  12. } parameter;
  13.  
  14. int main ()
  15. {
  16. // Will this work?
  17. parameter.function(parameter);
  18. // Or this?
  19. base_1.function(parameter);
  20. }
Success #stdin #stdout 0.02s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty