Question
1.In this program its job is to reads the data from a text file the data from the text file is about files and folders
1.In this program its job is to reads the data from a text file the data from the text file is about files and folders stored in a storage device, here is the code I have done:
#include
char getNumber(string line) // getting the ID number from the first line of file { return line[1]; } };
#include
int main() {
string fileName = "file.txt";// file name is stored in the filename variable Data_Struct dataStruct;// creating the object of the file class dataStruct.loadFromFile(fileName);// reading the contents dataStruct.printlines();// printing the contents of the file
return 0; }
Here is the output:
[0][Root][0][T][0] the ID number is:0 [1][file.txt][45643][F][0] the ID number is:1 [2][folder1][0][T][0] the ID number is:2 [3][file2.txt][7346][F][2] the ID number is:3
now I wish to put this data in a binary three using the id number of each number. The problem is that the root has to begin with 0. And after that the program should list search delete and add files or folders through the binary three. finally the application should be abble to export the tree data structure currently in memory to a text file respecting the format as shown in the output so it can reopen the application. The program must be written in c++ object oriented and the library classes used must be shown and the program must be with comments so it can be understandable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started