Solved

sta*tic mem*ory que*ue

Posted on 2008-09-30
1
198 Views
Last Modified: 2012-05-05
I want resourcess about static memory queue implement in c.Is it possible the size of this queue to be parameter from the user??
0
Comment
Question by:Tom211
1 Comment
 
LVL 53

Accepted Solution

by:
Infinity08 earned 50 total points
ID: 22610075
>> Is it possible the size of this queue to be parameter from the user??

Sure, if you make the queue dynamic :) You can use malloc/calloc to allocate enough memory for the queue, realloc to resize the queue, and free to release the memory for the queue.

        http://www.cplusplus.com/reference/clibrary/cstdlib/malloc.html
        http://www.cplusplus.com/reference/clibrary/cstdlib/calloc.html
        http://www.cplusplus.com/reference/clibrary/cstdlib/realloc.html
        http://www.cplusplus.com/reference/clibrary/cstdlib/free.html
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question