我傳遞隊列這樣的源文件AC和BC之間傳遞隊列作爲參數在C
文件:AC
sq[a]=new_queue();
pthread_create(&st[a],NULL,sendPacket,sq[a]);
文件:BC
void *sendPacket(void *queue){
/* here i need to know which queue has come ,determine
the index of queue how can I do it? */
}
請更新您的稱號;問題不在於「將隊列作爲參數傳遞」。 –