Okay..here is my problem. I have to write a program that will ask the user where their database name is. It will then make a system call and check to see if there is a folder with that name, if there isn't..then it will create 2 new (binary format) files called relcat and attrcat.
Now, each file is a database. Relcat will contain 2 entries...1 about itself and one about attrcat.
The other is attrcat..which will contain 12 entries...6 of itself and 6 of relcat.
Now, each will have it's own class with the structures
relcat( char 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])
http://sulimo.tusculum.edu/%7Eron/fi...tWorkSheet.htm
looks sorta like that
Each file will be a fixed length record with those structs as the guidelines. However, I can't figure out how the structs are supposed to help me.
I just can't figure out how to make the tables dynamic...such as...record count just go up as relcat gains rows, and the attrcat info in relcat should go up as the attrcat table gains info. Soo..rec count in relcat should eventually be 2 and 12 in attrcat.
I don't see how I'm supposed to get all of that information put in without hardcoding it all so that the format is right.
Any help is appreciated =/