Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Returning a queue handle. (http://www.go4expert.com/forums/returning-queue-handle-t7180/)

waichoy 5Nov2007 03:46

Returning a queue handle.

I'm a student and new to this forum.
I have a question about creating handles.
I'm trying to write a function that creates a queue and then returns a handle to the created queue:

QueueHandle createQueue();

QueueHandle is an unsigned char type.
I know I can return a pointer as a handle to the queue.
However, I'm not allowed to change the function prototype as part the requirement of my assignment.
Is there anyway to return an unsigned char handle to a queue?
If it's any help, I'll be using an array to implement a queue.
Any suggestions would be appreciated. Thank you. :)

All times are GMT +5.5. The time now is 15:55.