473,396 Members | 2,011 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,396 software developers and data experts.

making a POP /remove method in a linkedQueue

16
I am CONVINCED that the reason my program is not working is because I have a faulty linkedqueue, however I cant see what is wrong with it. could someone please look mine over and see whats wrong with it?


Expand|Select|Wrap|Line Numbers
  1.  public item_t remove(){
  2. item_t place= rear.item;
  3. //front=null;
  4. //out.printf("%sOMG\n",place);
  5.         if(front==null){
  6.       front=front.link;
  7.           // out.printf("node?");
  8.           }
  9.         if(front==rear){
  10. //out.printf("node?");
  11.         rear=null;
  12.       front=null;
  13.           }
  14. //front=front.link;
  15. //item_t place= front.item;
  16. //out.printf("PORTAL");
  17. //item_t place= front.item;
  18.  
  19. return place;
  20.     }
  21.  
  22.  
Apr 23 '11 #1
0 1015

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: m. pollack | last post by:
Hi all, I'm still trying to get to the bottom of the problem I am having with the CollectionBase class and the Object Collection Editor. Briefly put, I am exposing a strongly-typed collection...
4
by: wk6pack | last post by:
Hi, I'm trying to use the remove method on a string but it doesnt seem to change it. name.remove(instr(name," ")-1,1) If name = bon jovi, I would like bonjovi but I get bon jovi in the...
7
by: greenflame | last post by:
I am trying to make a matrix object. I have given it some properites. I am trying to add a method. When I call the method by Test.showDims(...) I want to only enter one input, that is the method by...
4
by: Anders Borum | last post by:
Hello! I'm am currently working on making a central cache component threadsafe, and was looking at the synchronized implementation of the Hashtable. I was wondering why you'd really want to...
0
by: a | last post by:
I'm trying to delete an item from a collection, by clicking on a delete button in a GridView control. The item in the collection is stored in the Profile object (serialized as xml in the...
7
by: a | last post by:
If the code to insert a new Student is: Profile.Teachers.Classes.Students.Add(new TCS.Student(id,teacher, class, name)); what is the code to Remove a student? I tried the code below, but I...
19
by: brasilino | last post by:
Hi Folks: I've been looking (aka googling) around with no success. I need a usability beyond 'pop()' method when removing an Array elements. For example: oName = new...
1
by: Rajesh Ojha | last post by:
Hello all Sir/Madam i want make a collection(c#) listype and we are use of remove method withe the help of object of mylist and how we can use dynamic array in c# please give me an example
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.