HKGalden學術臺
發表文章發起投票
[C programming] circular queue 問題
我用linked list 黎做, 但係 dequeue 果時有error, 會沒有回應
幫我睇下有咩問題

int getItem(circularQueue_t *theQueue, int *theItemValue)

{

if(isEmpty(theQueue))

{

printf("isempty\n");

return(-1);

}

else

{

*theItemValue=theQueue->data[theQueue->first];

theQueue->first=(theQueue->first+1)%MAX_ITEMS;

theQueue->validItems--;

return(0);

}

}
Good0Bad0
2015/04/28, 1:49:01 凌晨
本貼文共有 0 個回覆
此貼文已鎖,將不接受回覆
發表文章發起投票