Q:

Creating object in C++

I am new to C++. Here's my problem. 
I declare bus, stepper as private instances in the h file: 
class Motor_control
{
public:
       ...
private:
    IICBus bus ;
    IICStepper stepper ;
    IICStepper stepper_r ;
    IICStepper stepper_l ;
};

And then initiate them in the constructor
Motor_control::Motor_control(){
    IICBus bus ("/dev/i2c-2",0,"");
    IICStepper stepper (bus,0x00, "Global addr");
    IICStepper stepper_r (bus,0x6e, "Stepper Modul");
    IICStepper stepper_l (bus,0x66, "Stepper Modul");
}

IICStepper was declared in .cpp:
 IICStepper::IICStepper(IICBus& bus, int addr, const string& name) : IICBase(bus,addr, name) { } in cpp

and in .h:
class IICStepper : public IICBase { public: IICStepper(IICBus& bus, int addr, const std::string& name); virtual ~IICStepper(){}; ...} 

It compalins 
       ../src/Motor_control.h:15: error: no matching function for call to 'IICStepper::IICStepper()'
../src/Stepper.h:41: note: candidates are: IICStepper::IICStepper(IICBus&, int, const std::string&)
../src/Stepper.h:38: note:                 IICStepper::IICStepper(const IICStepper&)
../src/Motor_control.h:15: error: no matching function for call to 'IICBus::IICBus()'
../src/Bus.h:28: note: candidates are: IICBus::IICBus(const std::string&, int, const std::string&)
../src/Bus.h:17: note:                 IICBus::IICBus(const IICBus&)
../src/Motor_control.h:15: error: no matching function for call to 'IICStepper::IICStepper()'
../src/Stepper.h:41: note: candidates are: IICStepper::IICStepper(IICBus&, int, const std::string&)
../src/Stepper.h:38: note:                 IICStepper::IICStepper(const IICStepper&)
../src/Motor_control.h:15: error: no matching function for call to 'IICStepper::IICStepper()'
../src/Stepper.h:41: note: candidates are: IICStepper::IICStepper(IICBus&, int, const std::string&)
../src/Stepper.h:38: note:                 IICStepper::IICStepper(const IICStepper&)
../src/Motor_control.h:15: error: no matching function for call to 'IICStepper::IICStepper()'
../src/Stepper.h:41: note: candidates are: IICStepper::IICStepper(IICBus&, int, const std::string&)
../src/Stepper.h:38: note:                 IICStepper::IICStepper(const IICStepper&)

A:

Before the constructor body enters, all user types are initialized. Because you don't have default constructors for IICStepper, you'll get the errors.
You need to use initializer lists:
Motor_control::Motor_control() : 
   bus("/dev/i2c-2", 0, ""),
   stepper(bus, 0, "Global addr"),
   stepper_r(bus, 0x6e, "Stepper Modul"),
   stepper_l(bus, 0x66, "Stepper Modul") 
{

}

Your version not only doesn't initialize the members, it creates new temporary objects which you never use afterwards.

