Following your link, I see you're having compile problems. However, the code in your link is much different than the code here, so it's not clear how to help. We try not to do homework for other people here. Can you be more specific about whats going wrong?
The code here is the original class. I am suppose to redesign the code so that I am using pointers.
1. Create an array of pointers of type Resistor.
2. Use elements of the pointer array to allow the user to dynamically allocate memory and to instantiate objects of the Resistor class.
3. Use the indirect member-selection operator (pointer) in the test routine to access function members of the Resistor class.
4. Write a new, non class function called in function main() to sort the pointers to the Resistor objects in order from lowest nominal resistance value to highest, passing a pointer to the Resistor-object pointer as the only passed data argument.
5. Display the sorted Resistor objects according to the nominal resistance value, from lowest to highest.
6. Within the sorting function, use pointer arithmetic to access the individual Resistor objects.
7. Function main() should also ensure that there are no memory leaks when the program ends.
I am not asking you to do my homework but I am just beginning and I would like some help.