Solved

sta*tic mem*ory que*ue

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

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Question has a verified solution.

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

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…
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 and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now