The folllowing code has me boggled. Here is a sample of code where you can see that the constructor for the FeetInches class is setting the numbers equal to the private variables inside...
int main()
{
// Define a LinkedList object.
LinkedList<FeetInches> list;
// Define some FeetInches objects.
FeetInches distance1(5, 4); // 5 feet 4 inches
FeetInches distance2(6, 8); // 6 feet 8 inches
FeetInches distance3(8, 9); // 8 feet 9 inches
// Store the FeetInches objects in the list.
list.appendNode(distance1); // 5 feet 4 inches
list.appendNode(distance2); // 6 feet 8 inches
list.appendNode(distance3); // 8 feet 9 inches
Yet this is the constructor...
// Constructor
FeetInches(int f = 0, int i = 0)
{ feet = f;
inches = i;
simplify(); }
WHY in the parameter list does f= 0 and i = 0? What does it do... If you need to see the full source code ill post it. But I must have forgot something i learned...