Solved

sta*tic mem*ory que*ue

Posted on 2008-09-30
1
196 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand recursion 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.

803 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