2,180 Topics

Member Avatar for
Member Avatar for farag

When define an template linked list inside an in order linked list I can't access the nodes of the internal template linked list by first and next functions Or in other words the template class can't be passing by reference??? :-O

Member Avatar for Ancient Dragon
0
80
Member Avatar for d4n0wnz

heres my code: [code=java] import java.util.Scanner; import java.lang.Integer; public class hmwrk4 { public static void main(String [] args) {Scanner kbInput = new Scanner(System.in); System.out.print("number of the element to delete: "); int numEle = kbInput.nextInt(); Node n8 = new Node(new Integer(8), null); Node n7 = new Node(new Integer(7), n8); Node n6 …

Member Avatar for Alex Edwards
0
155
Member Avatar for JConnor135

Can someone please help me find out why I am getting a nullpointerexception for this code. Ive been racking my brain and cant find it for the life of me. The program is supposed to delete an element from the linked list that is built in the main method and …

Member Avatar for Alex Edwards
0
272
Member Avatar for JConnor135

For this code to delete an element from a linked list how do I get the head to point to the first element in the list(which is 0)? [ICODE]public class IntNode1 { public int item; public IntNode1 next; public IntNode1 head; //////Constructor/////// public IntNode1(int item1, IntNode1 next1) { next=next1; item=item1; …

Member Avatar for Alex Edwards
0
279
Member Avatar for JConnor135

I am trying to write a program that will delete the nth element from a linked list. Before I was getting a nullpointerexception but I think I cleared that up. Now I just get a repeating error message that I put in the code for when the list goes to …

Member Avatar for JConnor135
0
273
Member Avatar for JConnor135

Hi, I am trying to write a code that will delete an element from a linked list and then display the updated list, but I keep getting a nullpointerexception, does anyone know where I went wrong? [ICODE]import java.util.*; public class IntNode { public int item; public IntNode next; public IntNode …

Member Avatar for Alex Edwards
0
87
Member Avatar for KaterynaK

I need to write a program that will read in a polish string and calculate the value of the string, using 2 linked list, a polish queue and evaluation stack. Here is what I got so far: [code=cplusplus] #include < iostream> using std:: cin; using std:: cout; using std:: endl; …

0
44
Member Avatar for ObliviousXYZ

Hi guys!I'm in great need and embarassment.I'm new to the C++ program and to be frank I'm having a hard time understanding it. Now our topic is about linked list and my professor gave us this machine problems: 1. Write a program that implements a linked list using an array.Your …

Member Avatar for Narue
0
136
Member Avatar for Q8iEnG

Hi :) I have a question, if you don't mind =] (What is the situation where quadratic probing is better than chaining?) I guess (as I'm thinking) while searching? maybe? because if the Hashtable have a lot of elements in chaining it'll take a lot of time searching the Hashtable …

Member Avatar for Q8iEnG
0
117
Member Avatar for d4n0wnz

my assignment is to write a 2 functions that check how many elements are in a linked list one of the functions have to solve it recursively and the other through the use of a loop. When compiling my code, I run into a load of errors and can't seem …

Member Avatar for VernonDozier
0
75
Member Avatar for aaaaaa1

Hi, I have a problem, if any body can solve it, please help me please urgently.Thanks... You are going to implement the doubly linked list (DLL). Your task is to simulate a workbench robot for wagon construction. Assume your DLL is a train with red, green and blue wagons. The …

Member Avatar for Ancient Dragon
-2
144
Member Avatar for licruzny

Please help with the following linked list program. Any help is good =] Use a linked list to do this program a store recieves shipmesnts of chairs at various cost. the store policy is to charge a 35% markup, and to sell chairs which were received earlier before chairs that …

Member Avatar for licruzny
0
163
Member Avatar for champnim

Hi I have to make a C program which has to perform a specified event at a specified time. Something like this... [code] Print Hello at 13:15 Print Bye at 14:20 Print working at 13:57 [/code] Assume that these instructions are already available. I am thinking of creating a doubly …

Member Avatar for Narue
0
91
Member Avatar for red devils

Hi, i'm new to C programming and i could use some help with an assignment. i would like to store a word in a linked list, with each letter of the word in a separate node of the linked list. i would then like to traverse the linked list to …

Member Avatar for red devils
0
174
Member Avatar for ac3this

I have to design and implement a new linked class called StudentList, to represent and manipulate the records of students enrolled in a course. The data field for each record in StudentList must contain: student name (string type) studentId (int) (from 0 to 10000) dept (string) major (string) In the …

Member Avatar for VernonDozier
0
151
Member Avatar for flash121

Greetings, I'm trying to write a function which gets two pointers as parameters. The first one "points" to the start of the first linked list, the second one is currently on null, but it will later serve as a pointer to the start of another linked list. The function is …

Member Avatar for flash121
0
100
Member Avatar for fddrummer06

I have a code for a doubly linked list, and I need to print it in reverse. I can't seem to figure out what I'm doing wrong, or maybe I just don't fully understand what I'm doing. The part that I'm questioning is in the printList function. The while statement …

Member Avatar for Ancient Dragon
0
123
Member Avatar for champnim

[code] struct fifo { int result; char *info; struct fifo *next; }*node; void add(struct fifo **n,int data,char *text) { struct fifo *temp,*node1; if (*n==NULL) { temp=(struct fifo *)malloc(sizeof(struct fifo)); printf("%d is to be stored\n",data); temp->result=data; printf("%d is stored\n",temp->result); temp->info=(char *)malloc(strlen(text)+1); strcpy(temp->info,text); temp->next=NULL; *n=temp; } else { temp=*n; while(temp->next!=NULL) temp=temp->next; node1=(struct …

Member Avatar for champnim
0
651
Member Avatar for maaply

Hi everybody, I have interview on next week. I know some question will come from link list. What kind of question will come in face-to-face interview's?. If some one post that kind of question, that will be very helpful to me. In this interview Question will be in C only. …

Member Avatar for Jishnu
0
65
Member Avatar for champnim

I have made a singly linked list that holds an integer & a string. The creation of the list works fine but deletion of a node is giving an error. Previously I was not adding a string to my list(only adding int)& at that time the code was working. please …

Member Avatar for LouPascalou
0
141
Member Avatar for manavsm

i want to delete the entry of a student using its roll no....its not working It is my earlier program and i just modified it but now i am not being able to perform deletion operation..if you will help me my project will get over.. [icode] #include<stdio.h> struct student { …

Member Avatar for stephen84s
0
112
Member Avatar for manavsm

PLZ HELP ME WITH THIS CODE...I HAVE GIVEN THIS CODE SO MANY TIMES BUT NOBODY IS ABLE TO CLEAR MY ERROR.... 1.DISPLAY IS NOT COMING ONLY LAST VALUE I ENTER IS DISPLAYED 2.DELETION OPETATION .............AND YES I WANT TO USE LINKED LIST....IF ANY 1 KNOWS IT TELL ME............. [ICODE] #include<stdio.h> …

Member Avatar for Luckychap
0
148
Member Avatar for anifreak

hello, ok i have this simple linked list program, as u can see below i got three functions: one to insert a node in the first of the list, the second to insert a node in the middle and the third to insert a node in the last of the …

Member Avatar for anifreak
0
256
Member Avatar for manavsm

i am facing problem when i am trying to get input...my input is not being taken correctly ... #include<stdio.h> struct student { char name[20]; int rollno; struct student *next; }; void display(struct student *first) { struct student *ptr; ptr=first; printf("\nCurrent list:\n"); while(ptr!=NULL) { printf("Name:%s\nRoll:%d",ptr->name,ptr->rollno); ptr=ptr->next; } } void delet(struct student …

Member Avatar for jephthah
0
276
Member Avatar for manavsm

when i am entering name and roll no only the last name and rollno is displayed and rest is not....i unable to detect where i went wrong and also ...deletion operation is also not working.........and ya i want to try this using linked list...plz i have to do this ne …

Member Avatar for jephthah
0
110
Member Avatar for joshmo

I am trying to do a simple queue using linked list. I am failing to perform dequeue because I cant get the logic straight. If there is anyone who could explain to me about the simple logic of this then it would help alot. Thanks. I have also posted the …

Member Avatar for Lerner
0
156
Member Avatar for ravviz

Im trying to make a sort of menu and im not sure how to do it. I want it too build the structure from a file and/or input and im not sure what kind of data structure i should save it it. I´ve been thinking about a linked list with …

Member Avatar for sweetyssweeto
0
73
Member Avatar for sahilarora

I am trying to pass a whole recordset into a query. I have made a form, with a listbox that is linked to a table that has 2 columns: Country and CountryID. When I select the Country on the form, i need the Country and the CountryId to be passed …

Member Avatar for Jishnu
0
103
Member Avatar for ff4930

Hello everyone, I have a project which is to find the permuted index of each word in a textfile. Im restricted from using STL btw. I read in input.txt and have to output each word and corresponding line number and if it is found multiple times, it will have (numoftimes) …

Member Avatar for ff4930
0
88
Member Avatar for ff4930

Hello everyone, My project consists of reading 2 lines of integers separated by white spaces corresponding coefficents and exponents, each line representing a polynominal. I have to add both polynominals and subtract them. I have made a linked list class to hold each coefficent and exponent in a node. The …

Member Avatar for VernonDozier
0
111
Member Avatar for bookworm619

I supposed to make in memory linked list. I thought I did it perfectly. My teacher is kind of the teacher that won't teach you but let you figure it out.. I couldn't figure it out!!! I supposed to make one like this but to manipulated the list. I am …

Member Avatar for mitrmkar
0
417
Member Avatar for Crushyerbones

Hello, sorry to ask, but does anyone know any working algorithms for quicksorting a doubly linked list? I'm only asking because I'm going to rip someone's head off if I have to keep doing it by myself any longer :P Don't worry, I understand how to it on my own, …

Member Avatar for Crushyerbones
0
64
Member Avatar for scream2ice

i've created a linked list which stores some info about documents such as code,title,creator,filename,... i've also stored some info about some other documents in a *.txt file i've got a search function in my program that gets a code from the user and tries to find that code either in …

Member Avatar for joshmo
0
149
Member Avatar for joshmo

I want to declare my linked list as external in my header file..so that my head and current pointers are globals..i have done something like this but i dont know where the problem is..i want the values of head and current to be initialized and used by all the other …

Member Avatar for joshmo
0
204
Member Avatar for cuplux
Member Avatar for joshmo
0
74
Member Avatar for monkey_slap

I ran into a roadblock developing my code for an assignment to sort a linked list as it is entered (insertion sort). We've had sketchy classes lately so the idea of linked lists is really rough for me at the moment because it's a little hard to understand. This assignment …

Member Avatar for Lerner
0
173
Member Avatar for m.cliter

hello, I m working on a Ford-Fulkerson algorithm to get the Maximum flow in residual graph, and min-cost algorithm. My representation based on adjacency-lists approach, where I keep track of all the vertices connected to each vertex on a linked list that is associated with that vertex. So far I've …

0
61
Member Avatar for joshmo

am trying to delete an element from my list but am having a problem..i have managed to position my pointers well but av failed to to the actual element. i.e user enters a number to be deleted from the list..here's the bit of the deleting code that i have been …

Member Avatar for joshmo
0
128
Member Avatar for sieghart0123

I'm new at C++ programming and am working on an assignment. I've managed to compile my codes alright but got an error while testing the program. The error surfaced halfway through viewing details of a linked list, where suddenly, the program started printing weird characters while the computer emit beeping …

Member Avatar for sieghart0123
0
130
Member Avatar for daniel88

Hi guys! I am currently having trouble in the final stages of an assignment which involves linked lists and dynamic arrays. The assignment involves adding books to a library. This means that each record has a title and one or more authors. I have worked out what I think was …

Member Avatar for daniel88
0
140
Member Avatar for dan_e6

hey guys. ive created this function that will delete the first element it finds in a linked list that has the value n in it. it works except when the number is the FIRST element in the list. it wont delete it, it will replace it with a 0 when …

Member Avatar for John A
0
107
Member Avatar for Crushyerbones

I'm doing a project for college. It's not too complicated but it involves a lot of data access on a linked list. Does anyone have any tips for designing an intuitive command line gui? I'm doing things like: [CODE=C] while (current !=NULL) for (i=1;i<10;i++) printf("%d *Name: %s\n",i,current->data.name); current=current->Next; switch (get_char()) …

Member Avatar for Salem
0
111
Member Avatar for Onixtender

I've got a question...we all know double arrays a[100][100], but how to change it into linked list or like" linked list to linked list" that we could transfer data like in a double array a[i][j]? 12345.... 2 3 . . . Ideas? Graph>weighted>minimal tree>neighborhood list(yes normally matrix, but i need …

Member Avatar for John A
0
90
Member Avatar for dan_e6

hey guys. ive been asked to do this: Write a recursive function which returns true if the linked list is sorted in ascending order. bool isSorted(nodeType *L) why would we use a recursive function to check if it's in ascending order? can anyone help me with this.

Member Avatar for n1337
0
466
Member Avatar for fusi0n423

I'm working on a lineEditor class (doubly linked list) and I'm switching it from using std::string to a template but I keep getting: lineeditor.cpp(33) : error C2143: syntax error : missing ';' before '*' when compiling. The code is: [code=c++] template <class T> int lineEditor<T>::getSize() { return maxLineCount; } template …

Member Avatar for Duoas
0
110
Member Avatar for mussa187

I am trying to call the method ip_uri from class into the main but it does let me what am i doing wrong? [code=cplusplus] #include <iostream> #include <string> using namespace std; class ip_uri_store { public: string count; // C++ string s are classes so this is aggregation. int id ; …

Member Avatar for mussa187
0
112
Member Avatar for virtual_friend

[[U]I][B]My Doubly linked list doesnt work when i try to display using backward/reverse traversal... Will you please help me....[/B][/I][/U] [IMG]http://www.withfriendship.com/user/images/616/1vijay.jpg[/IMG]

Member Avatar for mitrmkar
0
76
Member Avatar for megatr0n

okay so I'm not sure how to do this, but suppose i have a struct that looks something like this: struct soundNode{ string identifier; sound new_sound; soundNode* next; soundNode* prev; }; sound is an object that is defined by a .h file. and in my main program, i have a …

Member Avatar for VernonDozier
0
78
Member Avatar for spirals

Not certain if this is the right place to ask this. I need to get two processes to use the same data. Process 1 reads text files, parses them and creates linked lists (structures).before this process terminates it display all the lists to prove the data has been loaded correctly. …

Member Avatar for spirals
0
108
Member Avatar for joshmo

Am trying to extract a string of characters and numbers from a text file into two different data types in a linked list...i.e the if the text file has the data myname 100 i want the "myname" to be stored as a string and then the 100 as an integer..can …

Member Avatar for joshmo
0
3K

The End.