You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assignment operator for both classes does not define its parameter as const, which it needs to be. The operator right changes the object which is assigned, therefore it cannot be const.
Solution
The operator overload must be const. This means the parameter (the object that gets assigned) cannot be changed. This means there need to exists two copies of the object, which can be problem for the Wifi class, since it owns an instance of ModuleSPICommunication
The text was updated successfully, but these errors were encountered:
The assignment operator from #15 does not work
Problem
The assignment operator for both classes does not define its parameter as
const
, which it needs to be. The operator right changes the object which is assigned, therefore it cannot beconst
.Solution
The operator overload must be
const
. This means the parameter (the object that gets assigned) cannot be changed. This means there need to exists two copies of the object, which can be problem for the Wifi class, since it owns an instance ofModuleSPICommunication
The text was updated successfully, but these errors were encountered: