Returning a queue handle.

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

  1. waichoy

    waichoy New Member

    Joined:
    Nov 4, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice