Hello again,
I've run into a brick wall while coding my new program. For some background info, this program is designed to be a simple simulator for overclocking CPUs (test what your chip can do before destroying it).
Anyways, I created a class so that each CPU is a declared object of the class. Inside the main program, there is an array of these objects strung together so that the user can test multiple CPUs if they so choose.
Here's some pseudocode to show you sort of how the program starts to flow.
//Start main()
Declare array of 5 objects of type CPU; //CPU is the class name
for(this loop lets each CPU be tested separately in squence)
{
User follows prompts to enter information about each CPU;
Program constructs the CPU object with data members according to given parameters from user;
}
... //The rest is not coded yet
//End main()
--------------------------------------------------------------------------------
And now for the problem at hand:
The problem comes in that I need to declare the array of CPUs before the user data is entered, and thus they objects are created using the default constructor in the class (in this case all members are set to zero). Then, after the data is entered, I need to reinitialize the CPU with the data...but I can't RECONSTRUCT the object using the paramaterized constructor! That's a compiler's worst nightmare and I get many errors. ARGGHH!
I'd like to find some way to do this without having to individually use modifier functions to enter in the data, but it is a last resort.
Any insight is GREATLY appreciated! TIA
P.S. I realize this is not the most efficient way to build this program, and if I did it again some things would be different. However, I have requirements to meet within this so things like the array can't be removed!
