Please send questions to
st10@humboldt.edu .
#include <iostream>
#include "MyNode.h"
using namespace std;
int main()
{
MyNode node1;
node1 = MyNode(13, 3.98);
cout << node1.get_cost() << endl;
cout << node1.get_quant() << endl;
if (node1.get_nextPtr() == NULL)
{
cout << "HOORAY! next is properly null!" << endl;
}
else
{
cout << "WHAT!!!!???? next ISN'T null?!?" << endl;
}
MyNodePtr nodePtr;
nodePtr = new MyNode(20, 0.99);
node1.set_nextPtr(nodePtr);
// show that node1 is "linked" to another node
cout << node1.get_nextPtr()->get_cost() << endl;
cout << node1.get_nextPtr()->get_quant() << endl;
return 0;
}