•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 375,171 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 2,129 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: 1994 | Replies: 1
![]() |
•
•
Join Date: Mar 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I'm currently in file processing and I have a project dealing with fixed length records and making an attrcat and relcat catalog.
Simply: use system calls to check if a dir is there and create a new one for the database.
system ("dir");
system ("mkdir Rambo");
system ("cd Rambo");
system ("mkdir Rambo");
tried that after searching the net and it didn't work. It won't CD properly.
Although my biggest problem is the catalogs. the fields are supposed to be;
relcat(chat relname[20], int reclength, int attrcount, int reccount, int sortfield, char format)
attrcat(int attrnum, int attroffset, int attrlength, char attrtype, char attrname[20], char relname[20])
Now, the relcat will start off as an entry about itself and one about the attrcat. The attrcat will be 12 entries...6 of itself and 6 of the relcat.
The problem is, I just can't understand how the struct's are supposed to help me =/
I know they are fixed length, but I just can't understand how I'm supposed to make the structures useful to me without flat out hardcoding the tables.
However, i know if i just flat out hardcode everything, then it won't be dynamic enough =/
Any advice on "iterating" through the structs to determine a sizeof() and make it write out to the files cleanly?
I've been thinking about this for 2 days straight...and I just can't understand how the structs are supposed to help me...
http://sulimo.tusculum.edu/%7Eron/files/hw1.htm
http://sulimo.tusculum.edu/%7Eron/fi...tWorkSheet.htm
there's the full stuff if i didn't describe enough. Any and all help is appreciated. =/
Simply: use system calls to check if a dir is there and create a new one for the database.
system ("dir");
system ("mkdir Rambo");
system ("cd Rambo");
system ("mkdir Rambo");
tried that after searching the net and it didn't work. It won't CD properly.
Although my biggest problem is the catalogs. the fields are supposed to be;
relcat(chat relname[20], int reclength, int attrcount, int reccount, int sortfield, char format)
attrcat(int attrnum, int attroffset, int attrlength, char attrtype, char attrname[20], char relname[20])
Now, the relcat will start off as an entry about itself and one about the attrcat. The attrcat will be 12 entries...6 of itself and 6 of the relcat.
The problem is, I just can't understand how the struct's are supposed to help me =/
I know they are fixed length, but I just can't understand how I'm supposed to make the structures useful to me without flat out hardcoding the tables.
However, i know if i just flat out hardcode everything, then it won't be dynamic enough =/
Any advice on "iterating" through the structs to determine a sizeof() and make it write out to the files cleanly?
I've been thinking about this for 2 days straight...and I just can't understand how the structs are supposed to help me...
http://sulimo.tusculum.edu/%7Eron/files/hw1.htm
http://sulimo.tusculum.edu/%7Eron/fi...tWorkSheet.htm
there's the full stuff if i didn't describe enough. Any and all help is appreciated. =/
•
•
Join Date: Mar 2004
Posts: 76
Reputation:
Rep Power: 5
Solved Threads: 2
try using the 'chdir' command to change directories. the problem with using system("cd"), is that the 'cd' command only affects the current process executing it. after that process terminates, the current working directory is reset to that of the parent process. in the case of using system(), this actually creates a new process to execute the command. so, system creates a new process, sets the current directory for that one, and then terminates; leaving the parent process still in the same directory.
i read ur assign, you are supposed to be making classes for each of those recat/attrcat. then you would instantiate objects of each one. to write to a file, use a binary writing method, like fread() and fwrite(). try and write some code and see where u get.
i read ur assign, you are supposed to be making classes for each of those recat/attrcat. then you would instantiate objects of each one. to write to a file, use a binary writing method, like fread() and fwrite(). try and write some code and see where u get.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
Similar Threads
- photo organizer / catalog (Window and Desktop Managers)
- E-Catalog Software (Computer Science and Software Design)
- www.e-catalog.org (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: multiplication tutorial
- Next Thread: Loop counting odd and even numbers


Linear Mode