0

Can anyone fix code?

Idk what's wrong If I print patient variable, it's ok. But if I print doctor error occurred https://code.sololearn.com/cp6wfA34Z63u/?ref=app

28th Jun 2018, 1:09 PM
Zhanarys Sairanbekov
Zhanarys Sairanbekov - avatar
1 Réponse
+ 2
The variables you declared in line 2,3,4 and 22,23 are class variables; they are like static variables in other languages. You can simply remove those lines as they don't do what you think they do :P All the variable declaring should be happening in the initialize method. If you declare @schedule in initialize, it'll all work.
28th Jun 2018, 1:54 PM
Schindlabua
Schindlabua - avatar