Posts

Showing posts with the label delete nodes

Insert and Reverse Nodes

/*  * midtermPraj.cpp  *  *  Created on: Nov 16, 2010 *  *    *      Description:  *      Write a C++ class that establishes a data structure for storing floating-point values. Implement  *   the data structure using a singly linked list. Required methods:  * Insert_Nodes, Display_Nodes, and Reverse_Nodes.  */ #include <iostream> #include <fstream> using namespace std; const char INPUT_PATH_FILE[] = "C:\\Users\\Shiva\\workspace\\midtermPraj\\floatingPoints.txt"; // Structure for our float node struct Float_Node { float Value; // Holds value struct Float_Node* Next; // Holds the address. }; class linkedList { private: Float_Node* base; Float_Node* p; Float_Node* q; //Float_Node* r; public: linkedList(); void insertNodes(double); void displayNodes(); void reverseNodes(); ~linkedList(); }; linkedList::linkedList() { // Default Construct...