Posts

Showing posts with the label singly linked list

C++ program that reads a textual data file and builds linked lists using the data therein.

/*  * pshrestha_1.cpp  *  *  Created on: Oct 27, 2010  *   Write a C++ program that reads a textual data file and builds linked lists using the data therein. Each line of the file contains a letter (either I or F) following by a corresponding numeric value. In each line, an integral value is preceded by character I and a floating-point value is preceded by character F. An "I integer" line may or may not be followed by one or more "F float" lines. Your program is to process each line of the file and build linked lists. An "integer" linked list (nodes sorted ascendingly by integer value) will be created using the "I integer" lines. "F float" lines will begin/continue another singly linked list "off of" the integer node corresponding to the integer value and node processed immediately before (again, any "I integer" line may or may not be followed by one or more "F float" lines). Any list of floating-poi...