0

hi all and thanks for reading. Personally i thought i wouldnt be in the frame of putting up one of my assignments, as i can see where an opinion might be formed, over me trying to pull as fast one and get someone to code this for me etcetc etc.....
But can someone tell me if im right in thinking it means...either:
1. create an array
2. create a struct
3. create *ptr array and one of the above
All to include user input and then to ba able to be saved appened and written to (using "r+a" syntax, at a newb guess) or am i looking at it to complicated, i dunno.

but some real help and advice would be nicey nice, if poss.
Thanks all
i just have to ask, ...would you consider being taught about files and records in Pascal a good way of learning about files records (or i think they are called structs or typedefs in C) for use in C.
I dont think so......... but would love to know an opinion or two on it.
My lecturer solidly believes otherwise, this is a frustration to me!but am willing to throw my hands up and be corrected etc :)
cheers all


Create a data file called Person.dat (or Person.txt)
Each line of the file (record) should contain Firstname, Surname, Postcode, dob.
The user must be able to:
i) Add a record to the file (append)
ii) Display the contents of the file
my issue is knowing where to start ?
lol...i guess

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by WaltP
0

i just have to ask, ...would you consider being taught about files and records in Pascal a good way of learning about files records (or i think they are called structs or typedefs in C) for use in C.
I dont think so......... but would love to know an opinion or two on it.
My lecturer solidly believes otherwise, this is a frustration to me!but am willing to throw my hands up and be corrected etc :)

Learn Pascal just to learn C? And you should learn Spanish if you want to speak Italian! If you have to learn Pascal file records, it's unnecessary. Just learn structs in C. If you know Pascal file records, You basically know structs in C. Why learn one (useless) syntax to understand another that's almost the same.

I hope you misunderstood him.

Create a data file called Person.dat (or Person.txt)
Each line of the file (record) should contain Firstname, Surname, Postcode, dob.
The user must be able to:
i) Add a record to the file (append)
ii) Display the contents of the file
my issue is knowing where to start ?

Create your struct.
Ask for input.
That's where I'd start.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.