Node.h
=====================================
#include
List.h
=====================================
#include
} If (Head-> Data == D) {head = head-> nextnode ();} else {currnode = head; while (currnode! = Null) {if (currnode-> data! = D) {Prenode = currnode Currnode = currnode-> NextNode ();} else {prenode-> deleteafter (); currnode = prenode-> NextNode ();}}}} template
==============================================
#include
) {Writefile << ";" << myfile.aboutfile << ";" << myfile.filepath << ";" << '/ n';} else {myfile.filepath = myfile.filepath "/"; Writefile << myfile.filename << ";" << myfile.aboutfile << ";" << myfile.filepath << ";" << '/ n';} Writefile.close (); Break Case 2: if (! Readfile) {cout << "DON't open jiru file" << Endl; exit (-1);} cout << "please input file name for fir finding file << Endl; cin> > FindValue; WHILE (a "/ n ')) {pre = 0; POS = 0; // get file name; pOS = linevalue.find_first_of ('; ', pOS); getmyFile.FileName = lineValue . Substr (pre, pos-pre); POS; pre = POS; // get file description; pOS = lineValue.find_first_of (';', pOS); getmyfile.aboutfile = linevalue.substr (pre, POS-Pre, POS-Pre, POS; pre = POS; // Get File path; pOS = linevalue.find_first_of (';', pOS); getMYFILE.FILEPATH = lineValue.substr (pre, pos-pre); POS; pre = pos; // Get getMylist Data For Create List Mylist.createlist (getmyfile);} mylist.athead (); while (MyList.CurrNode ()! = Null) {if (myList.data (). FileName == FindValue) // when Find file;
{COUT << "Find file" << Endl; cout << "################################################# ######### << Endl; cout << "<" << mylist.data (). Aboutfile << "<" << Endl; cout << "######## ########################### "<< endl; cout <<" do you want to like Source "<< endl; cin >> CH; if (ch == 'y') {string filepath; filepath = mylist.data (). FilePath mylist.data (). FileName; // Erase Char '/ n'; For (i = 0; i <= filepath.size (); i ) {if (filepath [i] == '/ n') {filepath.rase (i, 1);}} // open file; ifstream OpenFiles OpenFiles.open (filepath.c_str (), iOS :: in); if (! OpenFiles) {CERR << "DON't Open file" << Endl; exit (-1);} // read file context; While (! OpenFiles.eof ()) {OpenFiles.get (Text); Cout.put (text);}}} mylist.next ();} mylist.deletelist (); break; case 3: if (! readfile) {cerr << "don't open the file << endl; exit (-1);} while (getfile (readfile, letvalue, '/ n')) {// get file name; pOS =
Linevalue.find_first_of (';', pOS); getMYFILE.FILENAME = lineValue.substr (pre, pos-pre); POS; pre = pos; // get file description; pOS = linevalue.find_first_of (';', POS); getMYFILE.ABOUTFILE = lineValue.substr (pre, POS-pre); POS; pre = pos; // get file path; pOS = linevalue.find_first_of (';', pos); getmyfile.filepath = lineValue .SUBSTR (Pre, POS-PRE); POS; pre = POS; // Get getMylist Data for Create List; mylist.createlist (getmyfile); POS = 0; pre = 0;} mylist.athead (); while ()! = null) {string filepath, descp; cout << "The file description" << endl; cout << mylist.data (). Aboutfile << Endl; cout << "**** *********************************************************** *********** "<< endl; cout <<" do you want to look Source "<< Endl; CIN >> CH; if (ch == 'y') { FilePath = mylist.data (). Filepath mylist.data (). FileName; POS = 0; for (i = 0; i <= filepath.size (); i ) {ix (filepath [i] == '/ n ') {filepath.rase (i, 1);}} cout << filepath; cout << endl; ifstream OpenFiles; OpenFiles.Open (filepath.c_str (), ios :: in); if (! OpenFiles) { CERR << "DON '
T open file "<< endl; exit (-1);} while (! OpenFiles.eof ()) {OpenFiles.get (text); cout.put (text);}} else if (ch == 'q" ) {Break;} mylist.next ();} mylist.deletelist (); break; case 5: exit (0);}}} Makefile ================== =======================================
Guanli: guanli.o list.h node.h g -g -i / home / c / zuoping2 / guanli.cpp -o guanli all: guanli.phony: Cleanclean: RM guanli.o