fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class cb{
  5. private:
  6. int v1;
  7. int v2;
  8.  
  9. public:
  10. cb(){}
  11.  
  12. cb(int n1,int n2){
  13.  
  14. v1=n1;
  15. v2=n2;
  16.  
  17.  
  18. }
  19.  
  20. void fs(){
  21.  
  22. cout<<v1<<" ";
  23. cout<<v2<<"\n";
  24.  
  25.  
  26.  
  27. }
  28.  
  29.  
  30.  
  31.  
  32. };
  33.  
  34.  
  35. class cd : cb{
  36.  
  37. private:
  38. int v3;
  39.  
  40. public:
  41. cd(int n3){
  42.  
  43. v3=n3;
  44.  
  45. }
  46.  
  47. void fscd(){
  48.  
  49. cout<<v3<<"\n";
  50.  
  51. }
  52.  
  53.  
  54.  
  55. };
  56.  
  57.  
  58.  
  59.  
  60. int main() {
  61. // your code goes here
  62. return 0;
  63. }
Success #stdin #stdout 0s 4528KB
stdin
Standard input is empty
stdout
Standard output is empty