1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Returning a queue handle.

Discussion in 'C' started by waichoy, Nov 4, 2007.

  1. waichoy

    waichoy New Member

    Nov 4, 2007
    Likes Received:
    Trophy Points:

    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. :)

Share This Page