fork download
  1. #include <string>
  2. struct IICBus {
  3. IICBus(const std::string&, int, const std::string&) {}
  4. IICBus(const IICBus&);
  5. };
  6.  
  7. struct IICStepper {
  8. IICStepper(IICBus&, int, const std::string&) {}
  9. IICStepper(const IICStepper&) {}
  10. };
  11.  
  12. class Motor_control
  13. {
  14. public:
  15. Motor_control();
  16. /* ... */
  17. private:
  18. IICBus bus ;
  19. IICStepper stepper ;
  20. IICStepper stepper_r ;
  21. IICStepper stepper_l ;
  22. };
  23.  
  24. Motor_control::Motor_control(){
  25. IICBus bus ("/dev/i2c-2",0,"");
  26. IICStepper stepper (bus,0x00, "Global addr");
  27. IICStepper stepper_r (bus,0x6e, "Stepper Modul");
  28. IICStepper stepper_l (bus,0x66, "Stepper Modul");
  29. }
  30.  
  31. int main () {}
  32.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor ‘Motor_control::Motor_control()’:
prog.cpp:24: error: no matching function for call to ‘IICBus::IICBus()’
prog.cpp:4: note: candidates are: IICBus::IICBus(const IICBus&)
prog.cpp:3: note:                 IICBus::IICBus(const std::string&, int, const std::string&)
prog.cpp:24: error: no matching function for call to ‘IICStepper::IICStepper()’
prog.cpp:9: note: candidates are: IICStepper::IICStepper(const IICStepper&)
prog.cpp:8: note:                 IICStepper::IICStepper(IICBus&, int, const std::string&)
prog.cpp:24: error: no matching function for call to ‘IICStepper::IICStepper()’
prog.cpp:9: note: candidates are: IICStepper::IICStepper(const IICStepper&)
prog.cpp:8: note:                 IICStepper::IICStepper(IICBus&, int, const std::string&)
prog.cpp:24: error: no matching function for call to ‘IICStepper::IICStepper()’
prog.cpp:9: note: candidates are: IICStepper::IICStepper(const IICStepper&)
prog.cpp:8: note:                 IICStepper::IICStepper(IICBus&, int, const std::string&)
stdout
Standard output is empty