Hi!!
I have a type queue_t, its a head of a linked list. Then I have these variables:
queue_t *exe_thr_list[15];
queue_t *expired_thr_list[15];
They are arrays of 15 elements, where each element is a pointer to queue_t (Pretty obvious).
So far so good. Now I want to make a function to swich them. What I mean is:
what ever exe_thr_list points to must (after the function is called) point to whaever expired_thr_list points to. And vice versa. In other words to swich the two arrays.
I made this obviously wrong code:
Code:
queue_t *tmp_queue[15];
tmp_queue = exe_thr_list;
exe_thr_list = expired_thr_list;
expired_thr_list = tmp_queue;
Wrong because I can't compile it with gcc, getting the following error:
error: incompatible types in assignment
in the last three lines of code.
Can someone point me to the light (LOOOL)??