hi, i am new here. hello hello

i have a few question about c++ (concept questions) can someone help me thanks.

1. if i want to make a boolean statement inside a class, do i need to have a accessor and mutator for it? and how do i declare it at the constructor outside and inside the class.

2. if i want to declare the method inside a class function that's about the other item in the class function is it doable?

overall: i am trying to make a boatyard project that involves inheritance and polymorphism. the code is almost done but i need some pieces of infomation to get it complete. thanks for reading now help me :)

Recommended Answers

All 2 Replies

1) Only if you plan on giving users of the class the ability to change the boolean directly.
2) Parse error, please try again.

1. ok so i don't need a accessor and mutator for the boolean statement in the class, since i can just toss the true or false for the boolean item in the constructor

sorry ... i don't think i know what i am trying to say earlier, but here is what i am trying to say. Narue thank you, your avatar is insane, yet awesome. ok ok here is what i am trying to ask.
2. donno what i am trying to say yet, i will post on this thread again when i figure it out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.