以下のコードはクラスのコンストラクターであり、このクラスにはメンバーがあります
int ** busyhours ;
コンストラクター
Instructor::Instructor ( int id , string name )
{
this->id = id ;
this->name = name ;
// initialize busyhours
this->busyhours = new int * [DAYS_WORKING] ;
for ( int i = 0 ; i < DAYS_WORKING ; i++ )
{
busyhours[i] = new int[HOURS_PER_DAY] ;
for ( int j = 0 ; j < HOURS_PER_DAY ; j++ )
busyhours[i][j] = 0 ;
}
}
ビジーアワー メンバーは、最初にこのポインターで使用されましたが、その後、このポインターなしで使用されました。理由がわかりません。回答ありがとうございます。