2,180 Topics

Member Avatar for
Member Avatar for writt

how to store the info of student in the linked list PROGRAMS 3 0.4 LABS 3 0.1 EXAMS 3 0.5 Student Student 1234 PROGRAMS 90 85 88 LABS 99 65 85 EXAMS 67 85 56 John lastname 3456 PROGRAMS 95 90 98 LABS 91 75 90 EXAMS 55 63 92 …

Member Avatar for Ancient Dragon
0
111
Member Avatar for Hey11

hello i wanna enter a function that contains various data types to be displayed in a linked list , but the problem that the program can't convert from int to void , and of course i can't make an int function for a string or char here is my function …

Member Avatar for daviddoria
0
81
Member Avatar for -ordi-

Input: A, B, C, D, E ... [CODE] 1/1 1/2 2/3 3/4 2/5 [/CODE] Output (Queue!): [CODE] 5 B 1 E 3 C 4 D 2 A [/CODE] How to make this? Mark competitors (persons) Example: A ... E their come in first queue. A can label/tag 1/1. B can …

Member Avatar for -ordi-
0
142
Member Avatar for hyperion

Hello all, Info: I am using Pelles C compiler. Some code first: Following is the linked list structure I am using. [CODE]typedef struct _NODESTRUCT { void* data; struct _NODESTRUCT* next; } NODESTRUCT, *PNODESTRUCT;[/CODE] Method to add a new node to linked list: [CODE]PNODESTRUCT AppendNode(PNODESTRUCT rootNode, void *data) { PNODESTRUCT tempNode; …

Member Avatar for Narue
0
164
Member Avatar for xxunknown321

I believe the error has something to do with my mergeArray function. Its a modified version of the insertNode function. i tried to make it so that i can loop through and insert an entire array of elements into a linkedList. My program compiles without error but gives me a …

Member Avatar for xxunknown321
0
174
Member Avatar for peterwalter

THis is what I need to do...I need help with the third point [INDENT]1. Write a class OrderedList. The implementation of OrderedList must be as a linked list of Comparable elements. The list items are maintained in ascending order at all times. On this assignment, no indexing methods are allowed. …

Member Avatar for helpmehelpme
0
255
Member Avatar for samsons17

I am in my way of studying the linked list chapter of C++.. So i go through this code below intended of understand it. [CODE] #include <iostream> using namespace std; struct nodeType { int info; nodeType *link; }; void printList (nodeType *first) { nodeType *current; current=first; while (current != NULL) …

Member Avatar for fmadsen
0
117
Member Avatar for bkempert

Hello everyone, I've used this website many times to help myself based off of others' questions, but now I have a problem of my own that I can not solve. I was assigned the task of creating a stack program in C++ using a linked list. Seems simple enough, but …

Member Avatar for bkempert
0
135
Member Avatar for Tecnicrow

I'm having problems trying to implement a counting sort for a template linked list. I already coded everything and I get the correct output. Now I just need to sort using counting sort method. When I run the project, the program crashes and it says: First-chance exception at 0x00262805 in …

0
71
Member Avatar for vinitmittal2008

Write a 'C' Function to combine two singly connected linked lists in the following manner. Suppose one list is "L" which can be given by L=(l0,l1,.....,lm) and the other list is "M" where "M" can be expressed as M=(m0,m1,......,mn) where each li,mi represents one node in the respective lists. For …

Member Avatar for vinitmittal2008
0
173
Member Avatar for yuri1969

Hi, I would like to make an threaded app which would use pthreads. I made a linked list and I put references to running threads here. I know that operations of adding a new thread reference to the list and removing a thread reference from the list after the thread …

Member Avatar for yuri1969
0
178
Member Avatar for jasleen12345

pls someone give me a c++ program to insert and delete an element from a linked list...i tried a lot but i am stuck..

Member Avatar for alaa sam
0
101
Member Avatar for wvuengr33

The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic …

Member Avatar for griswolf
0
336
Member Avatar for mrkm1188

Hi, I'm trying to multiply two linked lists and return the result as a linked list. Any ideas?

Member Avatar for jon.kiparsky
0
48
Member Avatar for dnambembe

Hi, I am writing a code that reads input from user to create a linked list database at the same, time it write the data received in to binary file. when I run the program is supposed to prompt the user to enter the data for ten time, however the …

Member Avatar for dnambembe
0
1K
Member Avatar for nikk18

I'm supposed to implement a queue using a singly linked circular linked list (it also has to be generic). It keeps saying there are incompatible types at lines 44 and 45. I've honestly been trying to work this out for hours, but I don't understand what i'm doing wrong. Any …

Member Avatar for jon.kiparsky
0
196
Member Avatar for tonycu

Hey guys, Well looked at a job online (IT consultancy job) and they require good level of procedural c++ programming ... I was wondering if anyone could hep me with any ideas or can show me any sites with advanced project ideas. All I know is linked list which I …

Member Avatar for hiddepolen
0
149
Member Avatar for TinhornAdeniyi

This is supposed to be a code for a video game store [CODE]#include<iostream> #include<fstream> using namespace std; ifstream infile; struct VideoGame { string Name; string Genre; string Publisher; string Developer; string Platform; string Price; int count; VideoGame *link; }; void CreateList(VideoGame*& first, VideoGame*& last); void CheckOut(VideoGame*& first, string title); bool …

Member Avatar for TinhornAdeniyi
0
236
Member Avatar for indrajeet6

[COLOR="Green"]Hi, I'm trying to write a linked list Program to accept a no. and print all the prime numbers less than it, using the sieve method, Explained below: Suppose that n=30.Then we list all the numbers till 30, and cross out 1 and all the multiples of 2, then 3,then …

0
259
Member Avatar for Joemeister

Hi there everyone!! Struggling a bit with some Linked Lists combined with copy constructors as well as operator overloading. Here is the code of the header (.h) and the implementation file (.C). Hope that you can help! [CODE] /////////////////////////////////////////////////////////// ////////////////// //////////////////// ////////////////// Queue.h //////////////////// ////////////////// //////////////////// /////////////////////////////////////////////////////////// #ifndef QUEUE_H #define …

Member Avatar for phfilly
0
102
Member Avatar for TinhornAdeniyi
Member Avatar for banana1073

For my Computer Science class, we are writing several different methods to reverse a singly linked list in Java. I cannot figure out the last way, which uses three helper methods, pointerToLast(Node n) which returns the tail node, nextToLast(Node n) which returns the second to last, and append(Node a, Node …

Member Avatar for jon.kiparsky
0
204
Member Avatar for minimi

[url]http://pastebin.com/aefXKD9w[/url] This is my code. If the command line csv file (for example, input.csv) has the following: Fred 22 Stella 11 Nellie 33 George 11 Violet 33 Rose 11 Bob 33 Lena 11 Billy 22 1) It should first print Fred is 22 years old.. Stella is 11 years old.. …

Member Avatar for javaAddict
0
188
Member Avatar for Iamthecheese

Hello, I'm having trouble translating an algorithm. I'm not sure I coded bits of this correctly, but I'm certain that I have no idea how to compare an item with a node identifier (cannot apply > operator with T,T) but since this is an insert sorted method rather than insert …

Member Avatar for kramerd
0
184
Member Avatar for CLina

Hello everybody! I have to Questions to ask please: 1) How can I find the maximum value in a single linked-list recursively? this is what I tried to do: int findMax(int key){ Node max=head; while (max != null){ if (max < max.getKey()) return(max.getNext()); } } it ends up to an …

Member Avatar for CLina
0
5K
Member Avatar for insanely_sane

Been working on this for 2 hours non stop. Can't seem to figure out exactly what's the problem. Perhaps I'm taking a wrong approach to this problem. Right, I need to copy a singly linked list to another new list. Can use any method EXCEPT RECURSION. Here's the code so …

Member Avatar for Taywin
0
3K
Member Avatar for bigwhiteegg

following is my main program Linklist is a class of circular Linked list so my question is since the parameter of function doesn't contain Linklist in it can I go ahead and call it "List" in any function, such as List.print(), anyway? [CODE]main() { linklist list; int choice, num; do …

Member Avatar for Taywin
0
158
Member Avatar for jothi lakshmi
Member Avatar for blackrandom

Okay, I have a header file I am trying to stub out to my_list.cpp but I keep getting these errors that I do not understand and have been working down to them but I got stuck. I figure I'm in deep trouble seeing as I can hardly stub these out, …

Member Avatar for blackrandom
-1
210
Member Avatar for sairakhalid

How can i make addition in my linked lists if the nodes are stroing two values: 1) int element 2) int colomnvalue i have to make the addition on the basis that the nodes having the same colomvalue, thier element should be added. This addition is to be made in …

Member Avatar for Taywin
0
164
Member Avatar for sairakhalid

i want to know whats the error over here. i just want to store the three value in a node and making a linked list but after storing two nodes that is headptr and than temptr, when the third node is made it stops. I think my error is somewhere …

Member Avatar for sairakhalid
0
177
Member Avatar for Barnifericus

Ok so Im trying to create a constructor that reads input from a text file. Which I got it to do. Then adds the information to a LinkedList. [CODE] public class CourseCatalog<T> { private BufferedReader read; private LinkedList<Course> catalog; public CourseCatalog(String filename) throws FileNotFoundException { catalog = new LinkedList<Course>(); try …

Member Avatar for jon.kiparsky
0
114
Member Avatar for smoothe19

I am attempting to edit this Queue class to only use myBack pointer, i began having errors and now I am lost.... LQueue.cpp is as follows [CODE]/*--- LQueue.cpp ---------------------------------------------------------- This file implements LQueue member functions. -------------------------------------------------------------------------*/ #include <new> using namespace std; #include "LQueue.h" //--- Definition of Queue constructor Queue::Queue() : …

Member Avatar for akgh2010
0
180
Member Avatar for hamza123

My question is that what is the effect if I delete a pointer in a linked list by mistake??? What problems will arise and how will I come to know that is a missing pointer that is causing the trouble?

Member Avatar for hamza123
0
98
Member Avatar for BadPointer

Hello guys, been struggling with implementing a linked list. I'm using this function AddToList to add elements. I'm clearly doing something wrong because no new element is added. Although when Im using a breakpoint inside the function i see that it seems right. [CODE] /* Main.cpp */ #include "LankadLista.h" #include …

Member Avatar for BadPointer
0
108
Member Avatar for purijatin

I am facing this problem where one thread keeps adding packets which it receives from the network to linkedlist. And the other thread retrieves it from the linked list. The below is the code of the Thread which keeps receiving the packets and add's them to list. [CODE] private class …

Member Avatar for JamesCherrill
0
93
Member Avatar for Tecnicrow

Hello, Basically I'm trying to use operator<< to display items from a linked list. coding in the header file. [CODE] template <class DataType> struct Node { DataType info; Node<DataType> *next; }; template <class DataType> class LinkedList; template <class DataType> ostream & operator<<(ostream & output, const LinkedList<DataType> & rlist); template <class …

Member Avatar for Tecnicrow
0
603
Member Avatar for pandaEater

I'm making a hash table using a linked lists to handle collision. So I'm creating an array of "head" pointers to access each linked list. I can't figure out why I'm getting the error below: error C2440: 'initializing' : cannot convert from 'LinkHash::ListNode' to 'LinkHash::ListNode *' I commented **not working** …

Member Avatar for pandaEater
0
279
Member Avatar for bkafroboy69

can anyone help me look over my code? The Course class A Course object should store the department, course number, and course title. It should have linked lists of prerequisites and "subsequents" (the courses for which this course is a prerequisite). The constructor should construct a course given a department, …

Member Avatar for bkafroboy69
0
119
Member Avatar for Vininski

Having a problem with assigning a string in this linked list, any ideas? the line that reports an error is highlighted in red. I would expect this to work as variable 'name' is a char array and i am simply assigning the string "Vin" to it. [CODE]#include<stdlib.h> #include<stdio.h> typedef struct …

Member Avatar for Vininski
0
251
Member Avatar for DishevldPeasant

I am trying to write a program that will take a text file and parse the words into a linke dlist that will be then printed to the screen with a user defined number of characters per line and I am running into some runtime issues with opening and procesing …

Member Avatar for Ancient Dragon
0
145
Member Avatar for nayefc

Hello, I created a linked list and implemented a deep copy function. However, the copied list skips the head node in the source list for some reason. So assume source list contains the following data in their respective nodes: 1 3 6 7 10 312 The copied linked list will …

Member Avatar for nayefc
0
3K
Member Avatar for da_navigata24

Hi, I'm fighting a battle with a linked list and I am currently losing. I am using the toolkit, pointers, nodes and a class. My code is still buggy because after building it, it just runs for a while then stops. Please help. Here is what I have, an implementation …

Member Avatar for Eagles36
0
271
Member Avatar for wvuengr33

The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic …

Member Avatar for wvuengr33
0
504
Member Avatar for Neon_Jesus

Hi, I am new to C and C++. This is my first course on the subject and my instructor handed out a printout in class with code on it to get us started, but he did not go over any other code or teach us any C. I can only …

Member Avatar for drkybelk
0
221
Member Avatar for kdott

I've got a program that is supposed to mimic a music playlist by implementing a circular, doubly linked list. However, i cant use java's LinkedList, i have to write my own linked list. I have a DblListnode class to keep track of the nodes (show below) [CODE]public class DblListnode { …

0
123
Member Avatar for GHETTO COWBOY

Hi I'm currently working on a college programming assignment and for this assignment I need to create a contact list of first name and last name and store them as the program runs I may not be able to explain this well but I understand what i have to do …

Member Avatar for csurfer
0
134
Member Avatar for ehsantl

Hi guys I'm struggling to write a code for traversing a directed graph. It contains City as nodes. I'm trying to put City(s) to a LinkedList and then work with them to find the path. However, as you will notice I'm still newbie in C++. I have a *nextcities as …

Member Avatar for alwaysLearning0
0
139
Member Avatar for Knome

I've searched all over google and this site. I've found a few hints here and there but after i make the changes either my compiler throws a fit or it doesn't produce the desired results. Here's what i want: I want to create a linked list in the main function …

Member Avatar for Martin B
0
4K
Member Avatar for Ogakor

Hello, I've been having problem with understanding merge sort for linked list. I understood merge sort for array though, I think. I've googled it and all I can find are codes. I need to understand the algorithm first before I can understand the code. Please help me understand merge sort …

Member Avatar for Martin B
0
199

The End.