AdAddendum A19 - C++ operator= question | Addendums and Bonus Projects | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
AdAddendum A19 - C++ operator= question
Avatar
New Member
Members
January 5, 2021 - 6:37 am
Member Since: January 5, 2021
Forum Posts: 2
sp_UserOfflineSmall Offline

Hi,

I see on the AdAddendum A19 that you remove the operator= on some class (for example, here, page 86):

struct ClassAValveParameters
{
ClassAValveParameters() {}
ClassAValveParameters& operator=()
(removed here)

which should be written as (typo?):

struct ClassAValveParameters
{
ClassAValveParameters() {}
ClassAValveParameters &operator=(const ClassAValveParameters &obj);
(removed here)

right?

But why? When I'll set parameters, it fill fails and Linker stop the execution:

void ClassAValve::SetParamerers(ClassAValveParameters _parameters) {
    parameters = _parameters;
}

saying "undefined reference to `ClassAValveParameters::operator=(ClassAValveParameters const&)'"

Maybe you can clarify this to me? Thanks

Avatar
New Member
Members
January 5, 2021 - 8:35 am
Member Since: January 5, 2021
Forum Posts: 2
sp_UserOfflineSmall Offline

Ok, got it using WickerAmpComboASPiK.zip project 😉

Thanks

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 775

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 846

Posts: 3353

Moderators: W Pirkle: 690