Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Class member initializers question

Status
Not open for further replies.

Lucifre

Full Member level 2
Full Member level 2
Joined
Jul 5, 2005
Messages
125
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,296
Location
Detroit MI
Activity points
2,389
I've heard that using member initializers in a class constructor is better (improved program runtime) than assigning values to individual class members... but is there any way to have a constructor check the values that are given to initialize the members and having a constructor issue a warning if the values are not correct while using member initializers?

I know that input from the user can be checked... but can the constructor with member initializers do it before creating an object?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top