Please, make this terrible code refactoring as soon as possible:
1. Stop using of global variables immediately. Pass appointment list array, its capacity (max size) and a reference to the current free index as addAppointmentRecords arguments.
2. Use operator == for appdate structures instead of these awful member by member comparisons.
3. Use break statement after "already filled" message.
4. Make a proper indentation: it's impossible to read (and understand) this nightmare now...
Next time add main data structures definitions to the snippet. Use code tag with the language specifier (feel the difference):
[code=cplusplus]
source
[/code]
Reputation Points: 1234
Solved Threads: 347
Postaholic
Offline 2,001 posts
since Jul 2008