Solved

sta*tic mem*ory que*ue

Posted on 2008-09-30
1
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

710 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