286 Topics

Member Avatar for
Member Avatar for Ahmed2

Hi guys, I'm trying to read data from an excel "csv" file and save it in a list. the problem is that I want to have a copy of this list named "list1" that will not change during the manipulations and claculations, because when I copied the contents of "list1" …

Member Avatar for mike_2000_17
0
229
Member Avatar for Eagles36

I have the program working up to the point where at the end of every test it fails and get. where do I need to look to start fixing the failed tests.(files are attached at the bottom) This is my output: START OF TEST 1: Testing insert, attach, and the …

Member Avatar for uzairrahim
-1
2K
Member Avatar for ogrishmania

I want to delete the first element from a list. this is my list: struct dlist { int liber; //it translates as "free" don't know what this is int nmax; //maximum number of elements DATA *pv; //a pointer with which i can move in list, also DATA is int }; …

Member Avatar for Ancient Dragon
0
133
Member Avatar for jnewman3

So I've been working on a Hash Table that uses nodes to store data. I'm having issues figuring out the copy constructor and assignment operator overloader. In my main I instantiate 3 hash tables. 1 default(size 10), 1 size 7 and another one that copies hashtable size 7 to it. …

Member Avatar for raptr_dflo
0
343
Member Avatar for cryonize

I have a bit a of a problem because I have no idea what's going on in my code. Could someone guide me with this? **It has to swap the nodes themselves. ** #include <iostream> #include <iomanip> using namespace std; typedef struct node { int DATA; node *NEXT; }; node …

Member Avatar for raptr_dflo
0
961
Member Avatar for while(!success)

Hey guys, I am writing a program which uploads a text file into a linked list then displays a menu prompt to the user. All of my functions work fine except when I try to exit the menu/program. The program crashes and I don't see where it is coming from. …

Member Avatar for while(!success)
0
240
Member Avatar for brandon93s

I am writing a program in C to build linked lists from scratch. However, I am getting hung-up on trying to build a link list that will automatically sort itself. By this, I mean that the nodes will automatically be placed in the correct location. My current code is putting …

Member Avatar for histrungalot
0
583
Member Avatar for pce369

I wrote a linked list program in C++ which compiles and works well. But I have been told that a) I have to have two separate structs instead of one that contains both the info and the node; and, b) that I have to use two pointers instead of the …

Member Avatar for Labdabeta
0
428
Member Avatar for cryonize

Can anybody tell me what's wrong with my selection sort of linked lists? It's meant to sort the whole node, not the data. #include <iostream> #include <iomanip> using namespace std; typedef struct node { int DATA; node *NEXT; }; node *HEAD = NULL; void Create(int data); void Display(); void Sort(); …

Member Avatar for Nick Evan
0
580
Member Avatar for cryonize

Hello again, I am asked by my professor to create a program using selection sort in a linked list. Selection sort with sorting only the data is pretty easy, but I'm having a hard time because he made us sort the nodes themselves. Can anyone help by giving atleast the …

Member Avatar for mike_2000_17
0
10K
Member Avatar for cryonize

I was asked to create a program that enters numbers and displays the before sorting order, and the sorted order displaying the previous node address and the next node address. I was told not to swap the data inside the nodes, but move the nodes themselves. I have a problem …

Member Avatar for TrustyTony
0
9K
Member Avatar for cahitburak

Hi all. I am trying to build a Binary Linked Trie but fail in basic pointer operations.Following code can be built but in debug or run mode, it breaks and outputs the error. [ICODE]typedef struct node { char ch; node *next; }; struct node *root = NULL; void add(struct node …

Member Avatar for cahitburak
0
951
Member Avatar for Usoda

I have a Product class that is the parent of 3 other classes; Books, Movies, Music. And the Product class connects to the Store class that holds the Store's location. If I need to find a certain Product I have to traverse the list of each the Store class and …

Member Avatar for JamesCherrill
0
188
Member Avatar for abed1986

Hello everyone, I have a program that intends to create a doubly linked list of structures, using the following header (q1.h): [CODE=c]typedef struct lNode* ListNodePtr; typedef struct lNode { char* string; ListNodePtr next; ListNodePtr prev; } ListNode; [/CODE] This is my implementation: [CODE=c]#include "q1.h" #include <stdio.h> #include <stdlib.h> #include <string.h> …

Member Avatar for abed1986
0
810
Member Avatar for cryonize

Hello! I have this problem with creating a linked list inside a linked list. Think of it as recording a list of customers, and at the same time, recording a list of items they bought individually. I tend to think that I might lose the head node and it's probably …

Member Avatar for Lerner
0
298
Member Avatar for nyxxie

struct looks like this: [CODE] struct ListNode; typedef ListNode* ListType; struct details { char first_name[20]; char last_name[20]; int start_number; int end_number; }; struct ListNode { details data; ListType next; }; ListType list = NULL; ListType head = NULL; ListType * PointerToHead = &head; [/CODE] I have a circular linked list …

0
151
Member Avatar for muraj

Hi all. I could really use some help on adding a node to the end of a doubly linked list. First off here is my node class along with the class where the adding should take place. For simplicity I did not add the other parts and classes of the …

Member Avatar for NormR1
0
412
Member Avatar for linezero

[CODE]void merge() { if(start==NULL) { start=start2; } else { temp=start; while(temp->next!=NULL) { temp=temp->next; } temp->next=start2; } temp=start; if(start==NULL) printf("\nList is empty"); else { printf("\nElements of the list:\n"); while(temp!=NULL) { printf("%d\t",temp->info); temp=temp->next; } } system("pause"); system("cls"); main(); }[/CODE] the following code is use to merge two linked list into one and …

Member Avatar for thines01
0
183
Member Avatar for SAM2012

I have a simple query, I am using code for "QUEUE IMPLEMENTATION USING SINGLE LINKED LIST" [url]http://ds4beginners.wordpress.com/2006/12/17/queue-implementation-using-single-linked-list/[/url] for my program but having an issue if you pleas help me. [CODE]public class queue { gcroot<message^> msg; queue* next; public: queue(); queue* enqueue(queue*,message^); queue* dequeue(queue*); void queue_display(queue*); void setbinding(String^); String^ getbinding(void); }object, …

Member Avatar for SAM2012
0
391
Member Avatar for drico7041

Hey, I created a phone directory program. But I was wondering if I could get some hints on how I could create a txt file and add, delete names and numbers on the txt file. [CODE]import java.util.*; import java.lang.*; import java.lang.Object; import jpb.*; public class PhoneDir { private static LinkedList …

Member Avatar for dantinkakkar
0
3K
Member Avatar for thache

I've been trying to figure out whats wrong here, but I just can't wrap my head around it. My compiler outputs the following when I attempt to compile it. [CODE] z:\Desktop\tmp\proj4>cl proj4_linkedlist.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. proj4_linkedlist.c …

Member Avatar for thache
0
341
Member Avatar for shaffatshah

I have a file(myfile.txt) with the following lines, the records are semicolon delimited [I]Bon Jovi;Living + 2;EP;A+ Metal Maze;Aliotta Haynes Music;LP;B- Shore Brothers, The;Wipe my door, check;LP;C+ Bulman, Dane & Greg;Dane & Greg Bulman;LP;C- Calbert, Herb & The Mexico Brass;Rise;LP;A´[/I] . . . I want to write a c program …

Member Avatar for WaltP
0
227
Member Avatar for Gsterminator

I need to know how to create methods to compare two sets of singly linked lists. The only problem is that I can't put a linkedlist inside the method parameters. Please help [CODE]import java.util.*; public class SLinkedList { protected Node head; // head node of the list protected Node tail; …

Member Avatar for Gsterminator
0
193
Member Avatar for Gsterminator

I need help with an add boolean method in a singly linked list, The only difference is that i start off with a dummy head. The method's job is to add non-repeating objects to the linked list. Please help: [CODE]public boolean add(Object newData){ Node current = head.getNext(); Node v = …

Member Avatar for Gsterminator
0
199
Member Avatar for Rimojenkins

Hello. I am working on a data structures program that should be quite easy, but after programming in assembly language using mips, I forgot a little bit of C++ and can't remember how to do this. I've used my googlefu for at least 2 hours and still have this problem. …

Member Avatar for Rimojenkins
0
174
Member Avatar for Jnk

Hello I am a new to C++ and have some questions. I have two classes called Point and Square like this: [CODE] class Point { int x, y; public: int getx() const { return x; } int gety() const { return y; } Point(int a, int b) { x = …

Member Avatar for Jnk
0
455
Member Avatar for GoodOldFashion

See I probably have the littlest knowledge on working with Linked Lists and I was thinking of creating a program that will accept three numbers which will be arranged on the list. However, I need to display the numbers everytime I input them, which I don't know how. My goal …

Member Avatar for GoodOldFashion
0
195
Member Avatar for needforkevin

hello all! i am working on a bank account type program where the user can add accounts delete accounts make deposits and so on. i have most of the code working but i am getting an error and i cant figure out whats wrong. if someone could steer me in …

Member Avatar for ravenous
0
170
Member Avatar for vincenzorm117

I have been having trouble developing a function that frees all of the memory associated with structs of a linked list. Im not asking for a clear cut answer, just an idea or a function that can aid. F.Y.I. the linked list contains a head struct and a tail struct …

Member Avatar for sorry711
0
236
Member Avatar for Ayzu

I'm trying to implement priority queue using a singly linked list, but the program is not running in the best way, n the display function is showing just first n last node's data , y??? [CODE]#include<iostream.h> #include<conio.h> struct node { int n,p,b; // Data members for getting Task no. ,Priority …

Member Avatar for Ayzu
0
242

The End.