1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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