![]() |
|
#11
|
|||
|
|||
Re: Inheritance Suspicious ProblemFrom my experience, normally i will ask user to input from console in C. I don't know what wrong with it because i am a newbie C++ programmer.
Do i violate the encapsulation concept ? I want some flexibility. therefore, i don't want to instantiate the object during the class instantiate. I want to initialize it during runtime and compile time which is much more flexible. I don't know the correct methods implement in C++. I hope someone who kind enough to help me in this problem. Thanks for your valuable information and opinion. Your help and opinion is greatly appreciated by me and others noob. A billion thanks to you. |
|||
|
#12
|
|||
|
|||
Re: Inheritance Suspicious ProblemIt isn't that you don't want to stop asking the user for input in your applications, rather, that you don't want to make your class dependent on the I/O method. I'll try to explain in code:
CPP / C++ / C Code:
:davis: |
|
#13
|
|||
|
|||
Re: Inheritance Suspicious ProblemI probably understand what you have mentioned here.
You mean make the class have many (constructor) method of instantiated the object to enhance flexibility and not any ask from user to initialize the object. I have learn from mistake. Many books also wrote this methods but i thought my methods is better. Therefore, i continue using it. If i have make some mistake, please correct me. Thanks for your remind. |
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Graphic problem in Unreal Tournament 2004 | zerox | Computer Software Forum - Games | 10 | 09-Oct-2005 13:31 |
| Runtime Problem involving "printf" in C Program | supamakia | C Programming Language | 2 | 09-Oct-2005 11:09 |
| a significant problem after installing Xp | mohammad | Computer Software Forum - Windows | 10 | 09-Aug-2005 08:03 |
| inheritance problem | ap6118 | C++ Forum | 8 | 11-Apr-2005 12:24 |
| Inheritance problem | CaptnB | C++ Forum | 2 | 27-Jan-2005 09:09 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The