fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class karan{
  5. int id;
  6. public:
  7. karan(int i) : id(i){}
  8. };
  9.  
  10. class Dhuria{
  11. int t;
  12. karan k;
  13. };
  14.  
  15. int main() {
  16. // your code goes here
  17. Dhuria d;
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:17:9: error: use of deleted function ‘Dhuria::Dhuria()’
  Dhuria d;
         ^
prog.cpp:10:7: note: ‘Dhuria::Dhuria()’ is implicitly deleted because the default definition would be ill-formed:
 class Dhuria{
       ^~~~~~
prog.cpp:10:7: error: no matching function for call to ‘karan::karan()’
prog.cpp:7:2: note: candidate: ‘karan::karan(int)’
  karan(int i) : id(i){}
  ^~~~~
prog.cpp:7:2: note:   candidate expects 1 argument, 0 provided
prog.cpp:4:7: note: candidate: ‘constexpr karan::karan(const karan&)’
 class karan{
       ^~~~~
prog.cpp:4:7: note:   candidate expects 1 argument, 0 provided
prog.cpp:4:7: note: candidate: ‘constexpr karan::karan(karan&&)’
prog.cpp:4:7: note:   candidate expects 1 argument, 0 provided
stdout
Standard output is empty