Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Files and types and dynamic arrays
Here is a chunk of me type code;
//record storing details of bowlers for match stats
type Bowlinfo = record
ID : integer;
firstname : string; //needed incase bowler leaves leaque(deleted);
surname : string; //needed incase bowler leaves leaque(deleted);
gamescores : array[1..6] of integer;
//record to store match details and stats
type MatchInfo = record
ID1 : integer;
team1name : string; //needed incase team leaves league(deleted)
team1 : array[1..6] of bowlinfo; //max of 6 bowlers per team per match
ID2 : Integer;
team2name : string; //needed incase team leaves league(deleted)
team2 : array[1..6] of bowlinfo; //max of 6 bowlers per team per match
var matchfile : matchinfo;
My question is that if i want to have a dynamic array in either of the types the code will not compile as the file type is not definite... this is limiting me to make choices now on the maximum number of bowelers per game and max number of games each bowler can play.
Could anyone suggest an alternate method for me to have a file storing match details with dynamic arrays for team1 , team2 and gamescores?
0 · ·