286 Topics

Member Avatar for
Member Avatar for yeungn

I'm getting a segmentation fault when I try to search a linkedlist using the following description: [CODE] //! Searches for the first occurrence of value v that appears in the list //! after node n //! //! @param v The value being searched for //! @param n The node in …

Member Avatar for prvnkmr449
0
165
Member Avatar for corby

Hi guys. For some reason I cannot get the linked list to print. I want to copy it(which works) but I cannot get the list to print after copying it. Any suggestions? [CODE]#include <iostream> using namespace std; struct node { int info; node* next; }; int main() { node* list; …

Member Avatar for chiwawa10
0
187
Member Avatar for ehsantl

Hi guys I'm trying to finish my assignment, I stuck in a weird situation. I'm trying to create a pointer a linkedlist. This linkedlist contains pointer to a user-defined objects (City) and I'm trying to add City to this linkedlist and then iterate through the linked list to find and …

Member Avatar for ehsantl
0
169
Member Avatar for coolboym99

I'm writing up a program for a class I'm taking where I need to make a linked list stack & queue. Right now I'm not quite done, but I'm having problems calling the functions from the .h file. What's happening is in the while loop, I'm trying to get data …

Member Avatar for coolboym99
0
200
Member Avatar for jasleen12345

this is a program that my teacher gave me in the class. but i didn't understand it....please explain it to me step by step... [code= c++] #include<iostream.h> class queue { int element; queue* next; public: queue* enqueue(queue*,int); queue* dequeue(queue*); void queue_display(queue*); }*head,*tail,object; queue* queue::enqueue(queue* head,int key) { queue* temp; temp=new …

Member Avatar for Ancient Dragon
0
120
Member Avatar for silvertooth07

i'm having a problem on the program we're tasked to do. originally, the "option" is an int but someone suggested to make it a character. i thought the problem was solved (i want to make the program print: "invalid output" if the user inputted non-numerical values) but when i tried …

Member Avatar for mike_2000_17
0
181
Member Avatar for MooGeek

Hi guys!! I'm currently developing an opensource CMS. but I've noticed that lots of Pro Programmers use Linked List. and of course if I want to make a opensource CMS I want to code it Professional way. that's why I've decided to use Linked List instead. the problem is I …

Member Avatar for rajarajan2017
0
143
Member Avatar for rajsekhar28

SortedInsert() is a function which given a list that is sorted in increasing order, and a single node, inserts the node into the correct sorted position in the list.I know this code works fine.I am just curious to know why we can't use just single pointer to node to traverse …

Member Avatar for Ancient Dragon
0
124
Member Avatar for george61

Pretty interesting problem about linked list. This program is about autobuses. Each autobus is given by brand, registration number, number of seats, kilometres and year when the bus was made. The program is organised as menu and when you hit number it calls some function. Problematic function: it should NOT …

Member Avatar for george61
0
104
Member Avatar for kaydee123
Member Avatar for melicaster

I need the node sorted (selection sort) whenever the data is entered front or end or deleted front or end. How to get it sort automatically everytime user entered a data? countItems() doesn't seem worked to the selection sort... This is my Node class. Mostly no problem... [CODE] public class …

Member Avatar for NormR1
0
389
Member Avatar for blue6dImension

[CODE] private Node<T> addAt(Node<T> node, T value) { if (node == null) { // special case return new Node<T>(value, null); } else if (node.getNext() == null) { // other special case node.setNext(new Node<T>(value, null)); } else if (node.getstuff().getName().compareTo(value.getName()) > 0) { node.setNext(new Node<T>(value, node.getNext())); } else addAtEnd(node.getNext(), value); } return …

Member Avatar for bbman
0
180
Member Avatar for circusfreak

Creating a program to read a text file full of words in alphabetical order. I then have to read it into a Linked List. The linked list should output total number of words, which I have managed to do. After this it needs to calculate the min and max depth …

Member Avatar for NormR1
0
135
Member Avatar for Crysomere

Hello, I attempted to create a linked list in Assembly which takes the values from x and stores them into the list LinkNode. While it does work properly in doing this, I am unable to get any calls to procedures to work after calling my GetLink procedure. The calls seem …

Member Avatar for Crysomere
0
89
Member Avatar for MaydayLove

Hey guys, I'm writting a program that reads a list of names from a file called name.txt and instert these names directly into a linked list in alphabetical order of [B]last[/B] names. For example, if the text file has these names: Henry Johns III, Albert Einstein, Henry Johns II, Mary …

Member Avatar for peter_budo
0
167
Member Avatar for nick22

I am very much a beginner and trying to create a linked list, asking the "user" to input 5 or 6 values. My problem is that I don't know the correct terminology or how to store the user's input so that I can create my pointer to the next value …

Member Avatar for WaltP
0
998
Member Avatar for arkanoid

I have been working on a number of card games. Important, of course, is shuffling the deck. I have come up with a few different ways to do this. Currently I do not shuffle, but to deal a card, I lay out the deck in order, selecting a random number …

Member Avatar for arkanoid
0
199
Member Avatar for ashish.men

Hi, I am trying to create an automated trading system and am fetching data from an API (interactive brokers) API. I need to store 30 nodes of tick data( Tick is a reference type struct I have created) and store it in a linked list. When i start the system, …

0
92
Member Avatar for deeep

Hello Guys, I have implemented a linked list. And my output looks something like dis: ************************************************* The elements in the list : address is = 163196952 ADOC1100250100000119666 address is = 163196968 ADOC1100250100000119666 address is = 163196984 ADOC1100250100000119666 address is = 0 ADOC1100250100000119666 TOTAL NO OF ELEMENTS IN THE LIST ARE …

Member Avatar for jephthah
0
163
Member Avatar for deeep

Hello Guys, I have found many source codes to implement linked list. But all are inserting or deleting the node values after user's choice. I dont want that. Insertion should happen dynamically. I have a client program running on another system. I fetch the data from that system through my …

Member Avatar for deeep
0
203
Member Avatar for sm4ckth3monkey

Hello I am working on a project for my roommate that involves reading in a text file that has x's and o's. The x's mean a wall and the o's mean an open path. The maze begins at 0,0 and ends at 15, 15. This makes the graph 15x15. I …

Member Avatar for VernonDozier
0
1K
Member Avatar for AltF4me

I'm developing a doubly linked list. Now the way I'm currently navigating it is by using a current position pointer, that starts at the tail and then loops round however many times you need (you'll tell the function) and it will then get to that node. Now, I'm having to …

Member Avatar for AltF4me
0
121
Member Avatar for spursfan2110

Hi all! So our T.A. gave us a function to use in our programming assignment as follows: [code=php] struct node *delete_from_list(struct node *list, int examnum) { struct node *cur, *prev; for (cur = list, prev = NULL; cur != NULL && cur->examNumber != examnum; prev = cur, cur =cur ->next) …

Member Avatar for spursfan2110
0
2K
Member Avatar for hongil14

This is a program im writing for class. Here is the exception im getting: Exception in thread "main" java.lang.NullPointerException at LinkedList_final.insert(LinkedList_final.java:72) at LinkedList_final.main(LinkedList_final.java:247) Basically, my program reads a text file and parse a string. And then, add the string to Linked list. Thank you for your time and any help …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for tcstom

Hi, My program keeps coming up with an Access Violation after I moved the code manipulating my linked list from the main function to a sub function. Looking at it with the debugger, I found that the sub function destructs the linked list, and then the main function attempts to …

Member Avatar for tcstom
0
182
Member Avatar for Alexia Ooi

This is the program i'm trying to develop. It's not an assignment or anything. I'm just a newbie trying out new stuff. But I'm getting frustrated with this. [CODE]#include <iostream> using namespace std; //========== struct ========== struct nodeType { string song; int rating; nodeType *link; }; //------------------------------------------------------------------------------ //========== function ========== …

Member Avatar for Salem
0
146
Member Avatar for xgenvn

I'm just a 4-months newbie in C++, and I have an assignment to do a small phonebook program for DOS or FreeDOS. This is what i got from days after searching: This is CTelrecord class that would save every record in details [CODE]class CTelRecord { private: int szTime; char szName[_MAX_NAME_LEN_]; …

Member Avatar for xgenvn
0
220
Member Avatar for mertserimer

the inputs are these computer 21 sabanci 4 sabanci 6 university 6 university 12 computer 17 university 3 computer 9 computer 6 sabanci 2 university 9 problem occurs at third line when the input name1 is equal with the previous input name1. Really thx for helping. Sorry for mess. #include …

Member Avatar for mrnutty
0
174
Member Avatar for PcCopat

Hello, I want to make a linked list program consisting of one main link, and each main links have sub link. [CODE]Main 1 -> Main 2 -> Main 3 -> ... -> Main N -> NULL | | | | Sub 1-1 Sub 2-1 ... ... | | Sub 1-2 …

Member Avatar for kbshibukumar
0
123
Member Avatar for nanosadra

struct Employee { /* Employee details */ char name[MAX_NAME_LENGTH+1]; /* name string */ char sex; /* sex identifier, either 'M' or 'F' */ int age; /* age */ char job[MAX_JOB_LENGTH+1]; /* job string */ struct Employee *prev, *next; }; static void menu_add_employee(void) { static struct Employee *employee_list = NULL; { …

Member Avatar for Adak
0
213

The End.