•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 391,952 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,836 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 5602 | Replies: 17
![]() |
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 107
I'm taking an Operating Systems class in which I have to write this monster of a C++ program and it's giving me a bit of trouble.
It would be amazing if someone would be able to help me out a bit. The only problem is the directions for the programming project are a bit intense. If anyone has a bit of free time on their hands I'd ENORMOUSLY appreciate it.
For the most part, my problem is that a lot of the directions are a bit vague and I'm not quite clear on how the information is to be stored.
The project outline can be found here:
http://cs.hofstra.edu/~cscsxd/hofstra/teaching/cs112/course_info/project1.txt
Basically I'm still working on the pseudocode for Part I (the create function). Here is some of the pseudocode I have so far (completely unfinished, and just some beginning ideas/attempts): www.techtalkforums.com/goodies/Homework.C
What I'm really confused about is how the information is to be stored in the two flat text files we're dealing with and how it's to be pulled from them. In addition, is it important that all of the contents of these files be stored in some form of ADT?
Thank you for taking the time to help me with this!
It's enormously appreciated
It would be amazing if someone would be able to help me out a bit. The only problem is the directions for the programming project are a bit intense. If anyone has a bit of free time on their hands I'd ENORMOUSLY appreciate it.
For the most part, my problem is that a lot of the directions are a bit vague and I'm not quite clear on how the information is to be stored.
The project outline can be found here:
http://cs.hofstra.edu/~cscsxd/hofstra/teaching/cs112/course_info/project1.txt
Basically I'm still working on the pseudocode for Part I (the create function). Here is some of the pseudocode I have so far (completely unfinished, and just some beginning ideas/attempts): www.techtalkforums.com/goodies/Homework.C
What I'm really confused about is how the information is to be stored in the two flat text files we're dealing with and how it's to be pulled from them. In addition, is it important that all of the contents of these files be stored in some form of ADT?
Thank you for taking the time to help me with this!
It's enormously appreciated Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 107
#2
Feb 24th, 2003
As a side note: I know the due date for the assignment says Thursday! But basically an intro sketch of the pseudocode is due then, and it's still subject to change. So I'm not procrastinating! I'm right on schedule with the rest of the class
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 107
#4
Feb 25th, 2003
*bump*
anyone? please?
I'm going to go see if I can hunt down a professor later today and ask for their help. Just if someone could give me a hand with how to go about storing this info in the text file, and how it would be pulled out of the text file. (Not looking for code here, just logic/theory ideas)
EDIT: I just want to add, this is the first time I've programmed in about a year and a half, so please be kind to me!
anyone? please?
I'm going to go see if I can hunt down a professor later today and ask for their help. Just if someone could give me a hand with how to go about storing this info in the text file, and how it would be pulled out of the text file. (Not looking for code here, just logic/theory ideas)
EDIT: I just want to add, this is the first time I've programmed in about a year and a half, so please be kind to me!
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Aug 2003
Posts: 37
Reputation:
Rep Power: 6
Solved Threads: 0
#5
Feb 25th, 2003
Sounds like a fun project. :p
Well, hmmm....a storage device...(in binary or text?).
...begin rambling...
A text file used as a table to index the files stored on the storage device.
I didn't read the instructions closely.....and it's been many, many years since I've programmed anything of the sort.
I guess you will have to decide how large a sector on the storage device is.
Given a video file to store...you will need a pointer to the beginning of the file...and know how large the file is to determine how much space is taken up....an additional portion of the record to list pointers and size of data between each chunk if it's not contiguous on the device.
Table should include totals....space used and free space available.
...end rambling...
If I knew C++ I would know what to use instead of fread and fwrite. Ha
Sorry I can't be much help. But it looks like the instructions include a lot of detail which your instructor evidently thinks is useful. Read a bit closer....I saw a struct declared that would be useful...the table directory seems to be detailed too.
Good luck, and if what I said above doesn't jive with the actual project, sorry.
Well, hmmm....a storage device...(in binary or text?).
...begin rambling...
A text file used as a table to index the files stored on the storage device.
I didn't read the instructions closely.....and it's been many, many years since I've programmed anything of the sort.
I guess you will have to decide how large a sector on the storage device is.
Given a video file to store...you will need a pointer to the beginning of the file...and know how large the file is to determine how much space is taken up....an additional portion of the record to list pointers and size of data between each chunk if it's not contiguous on the device.
Table should include totals....space used and free space available.
...end rambling...
If I knew C++ I would know what to use instead of fread and fwrite. Ha
Sorry I can't be much help. But it looks like the instructions include a lot of detail which your instructor evidently thinks is useful. Read a bit closer....I saw a struct declared that would be useful...the table directory seems to be detailed too.
Good luck, and if what I said above doesn't jive with the actual project, sorry.
•
•
Join Date: Aug 2003
Posts: 37
Reputation:
Rep Power: 6
Solved Threads: 0
#7
Feb 25th, 2003
The file attributes look like they are going to be at the beginning of the stored file....including, if needed, the pointers and sizes if the file is broken into chuncks across the the storage device.
And the table file includes the file name, attributes pointer (struct) and pointer to initial data.
Am I wrong here?
Given a file....
psuedo code ramblings
....stored correctly.....return ZERO.
Given a file...
psuedo code ramblings
duplicate file name
....File already exists....return -1
Given a file...
psuedo code ramblings
maxed out files on storage device
....no directory entry available....return -2
( maybe a hash set up for a finite amount of directories)
Given a file...
psuedo code ramblings
....not enough space available for storage.....return -3
Given a file.....
psuedo code ramblings
...what was that?......return -4
---------------------------
OK, I know I left out the important part....Ha.
And the table file includes the file name, attributes pointer (struct) and pointer to initial data.
Am I wrong here?
•
•
•
•
- a zero if it can successfully create a file with the above
attributes and file initialized with data pointed to by
"initial_data"
- -1 a file with this name already exists;
- -2 exceeded the maximum number of allowable files (i.e. the
no of files exceeded the number of directory entries);
- -3 no space on the disk;
- -4 data for initialization insufficient;
Given a file....
psuedo code ramblings
....stored correctly.....return ZERO.
Given a file...
psuedo code ramblings
duplicate file name
....File already exists....return -1
Given a file...
psuedo code ramblings
maxed out files on storage device
....no directory entry available....return -2
( maybe a hash set up for a finite amount of directories)
Given a file...
psuedo code ramblings
....not enough space available for storage.....return -3
Given a file.....
psuedo code ramblings
...what was that?......return -4
---------------------------
OK, I know I left out the important part....Ha.
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 107
#8
Feb 25th, 2003
Thank you for your reply. I can see you actually took the time to read over the assignment, for everything you said definitely applies.
I just got home from school and am doing my Creative Writing assignment right now. As soon as I finish it, I'll have the rest of the night to work on this CSC assignment (at which time I'll most likely revisit this thread and post the latest).
I just got home from school and am doing my Creative Writing assignment right now. As soon as I finish it, I'll have the rest of the night to work on this CSC assignment (at which time I'll most likely revisit this thread and post the latest).
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 107
#9
Feb 26th, 2003
Aelfinn, you were really a big help to me, thank you
I worked on the homework for quite awhile last night, and I'm going to go back to it tonite. As I mentioned already, the pseudocode is due tomorrow. 
One question ...
The table which needs to be used as an index to the files: would it be okay if I pulled all of the information out of a text file upon opening the program, stored them in a linked list for the duration of the program, and then re-outputted them back to a flat text file when I am finished w/ them?
The program calls for adding/editing/removing files, so I figured this would be the best way to handle it.
I worked on the homework for quite awhile last night, and I'm going to go back to it tonite. As I mentioned already, the pseudocode is due tomorrow. 
One question ...
The table which needs to be used as an index to the files: would it be okay if I pulled all of the information out of a text file upon opening the program, stored them in a linked list for the duration of the program, and then re-outputted them back to a flat text file when I am finished w/ them?
The program calls for adding/editing/removing files, so I figured this would be the best way to handle it.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
accounting software selection apple business software computer engine erp systems evaluation evaluations france google internet leopard library linux microsoft open operating operating system os parliament project project management search selection software selection software solutions source switching system technology technology evaluation torvalds upgrade vista windows xp
- Install multiple operating systems? (Techies' Lounge)
- Two operating systems (Techies' Lounge)
- double boot for running two operating systems (Windows NT / 2000 / XP / 2003)
- Operating Systems - choice - simultaneous or alternative (Windows NT / 2000 / XP / 2003)
- Windows with 2 operating systems (Windows NT / 2000 / XP / 2003)
- Two Operating Systems (how to?) (Windows NT / 2000 / XP / 2003)
Other Threads in the C++ Forum
- Previous Thread: C++ Templates
- Next Thread: question



Linear Mode