Hi, fairly new to delphi (and all) coding. Hope someone can help.
I am setting up a record type for a question:
type
question = record
questionNo: integer;
questiontext: string;
choice1: string;
choice2: string;
correctanswer: integer;
end;
What I am trying to do is read a question in from a memo, the line in the memo reads
1,'Scotland won the World Cup in 1998','True','False',2
How do I input this information into the data structure from a memo(or text file, thats what I'm reading into the memo in the first place?
Ideally I would have an unlimited number of questions in the memo, and I could say
q1:question;
q1(memo1.lines[0])
and q1 would store all the data in the correct place, and I could then repeat this for q2, q3 etc and change text files.
Is there an easy way to do this or do I need to rethink my plan?
Thanks,
Ewan