473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

implementation of queue in c++

how can i implemete a pointer-based queue in c++?

Jul 23 '05 #1
5 5553
surrealtrauma wrote:
how can i implemete a pointer-based queue in c++?


Why would you want to: what about using std::queue?
Best

Kai-Uwe Bux
Jul 23 '05 #2
Kai-Uwe Bux wrote:
surrealtrauma wrote:
how can i implemete a pointer-based queue in c++?


Why would you want to: what about using std::queue?


Because std::queue is value-based (like any Standard container), not
pointer-based?

Jul 23 '05 #3
Rapscallion wrote:
Kai-Uwe Bux wrote:
surrealtrauma wrote:
> how can i implemete a pointer-based queue in c++?


Why would you want to: what about using std::queue?


Because std::queue is value-based (like any Standard container), not
pointer-based?


I am confused, very likely, I do not understand what "pointer-based queue"
means: what about std::queue< T* > or some std::queue< SmartPtr< T > > ?
Best

Kai-Uwe Bux
Jul 23 '05 #4

"Rapscallion" <ra********@spambob.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Kai-Uwe Bux wrote:
surrealtrauma wrote:
how can i implemete a pointer-based queue in c++?


Why would you want to: what about using std::queue?


Because std::queue is value-based (like any Standard container), not
pointer-based?


A standard container can both provide the allocation mechanism or let the
user manage it. What makes you believe that a valid derefenced pointer is
not a value?
Jul 23 '05 #5
Rapscallion wrote:
Because std::queue is value-based (like any Standard container), not
pointer-based?

I am not sure what you mean. It is implemented by using pointers and can store variables,
pointers or any other objects.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andreas Mallek | last post by:
hello, i'm looking for a good method to create an short path algorithm like dijkstra. well.. i hope that i can find someone that already integrated spa's with python. my goal is to find ways...
6
by: MPowell | last post by:
Lets suppose the return value on new_command is MSG2_STATUS My intent then is to memcpy the data via the call to CMDHolder and have a function that'll retrieve a copy of the 'stored' data. The...
6
by: Nikolay Petrov | last post by:
I need to write tcp client/server program. The client should connect to server at specified intervals and download some data. The data is collection of strings. What I don't know how to do is how...
4
by: j_depp_99 | last post by:
Thanks to those guys who helped me out yesterday. I have one more problem; my print function for the queue program doesnt work and goes into an endless loop. Also I am unable to calculate the...
1
by: VanKha | last post by:
I write a queue program but it doesn't work properly:I enqueue an element and dequeue just after that, but the output is the first value and then many times of "Empty queue.."!Why ?Please help me. ...
11
by: amolbehl | last post by:
Hi. Does anyone know how to implement queue in VB6.0 ? I just need the push function to push end of queue and pop to remove an item from top of the queue.
0
by: clintp | last post by:
I've seen a few people asking for this elsewhere, so here's a basic implementation of a string trie in C#. I'm using this to load and search a dictionary of about two hundred thousand words. It's...
0
by: tabassumpatil | last post by:
Please send the c code for: 1.STACK OPERATIONS : Transfer the names stored in stack s1 to stack s2 and print the contents of stack s2. 2.QUEUE OPERATIONS : Write a program to implement...
14
by: AlarV | last post by:
Hello everyone, here is my problem. I have to make a dynamic priority queue,which is a heap, and my book isn't helpful at all, so I have no clues on how to create it.. I read something like a static...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.