看板 EE_DSnP 關於我們 聯絡資訊
while (i < R_SIZE) { const MemRecycleList<T>* ll = &(_recycleList[i]); while (ll != 0) { size_t s = ll->getSize(); if (s) { cout << "[" << setw(3) << right << ll->_arrSize << "] = "<< setw(10) << left << s; if (++count % 4 == 0) cout << endl; } ll = ll->_nextList; } ++i; } 這是在MemMgr.h中的一小段... 對於ll有點不太懂@@" 在第二行它指向了 &(_recycleList[i])的位址 請問ll!=0是什麼意思呢? 它既然是個pointer 裡面應該存的是位址 那什麼時間ll會=0離開while迴圈呢 另外...也不太懂ll = ll->_nextList的意思 因為&_recycleList[i]已經代表指向現在0~255的RecycleList了 所以_nextList就是投影片教的指向超過255(也就是%256的recyclist囉?) 麻煩老師了<(_ _)> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.166.159.66