2,180 Topics

Member Avatar for
Member Avatar for HumanBeing86

// Linked list Hi... Below is the codes that I wrote so far... everything is fine but just abit headache on when trying to read the data from the file...and it give me a weird things... my output suppose is like this [CODE]============================================================== No Name/Site Location Weight 01 ThunderStone Russia …

Member Avatar for HumanBeing86
0
126
Member Avatar for DmytriE

I've got a project that requires the user to input a capacitor's ID and its corresponding capacitance. The user can add the capacitor at the beginning or end of the list. But, I'm having trouble figuring out how to put it at the end of the list. [CODE] while( currentPtr …

Member Avatar for Ancient Dragon
0
127
Member Avatar for dgreene1210

im getting the error below and I can't figure out why this isn't working. Ive looked at this for 2 days not knowing. I'm hoping a fresh set of eyes on it might help. main.c:13: warning: assignment makes pointer from integer without a cast [CODE] //HEADER FILE: #include <stdlib.h> #include …

Member Avatar for Ancient Dragon
0
716
Member Avatar for dgreene1210

I'm having problems with my code all over. I have to be able to open a command line argument( which i know how to do). create a linked list, and print it backwards. This is what i have but im stuck with errors that i don't know how to fix. …

Member Avatar for dgreene1210
0
190
Member Avatar for smallrubberfeet

Hello all, I'm having a bit of trouble logically figuring out what to do in this case for my cs150 class. I have to create a linked list from a while loop, but I can't figure out how to link the list successively at the end of each line so …

Member Avatar for Clinton Portis
0
2K
Member Avatar for smallrubberfeet

Hello, I need to sort the following by ID as I enter them into a linked list by while loop. So far I can build through the list, but I'm not sure how to sort by ID as they are entered: Albert 1000 55.5 150 Babs 3000 60 110 Freida …

Member Avatar for mazzica1
0
131
Member Avatar for FinaL111

Hello I have a question regarding linked list: The assignment I was given was rather large so I'm not going to go into the full details of what exactly it does and give you just what is needed to answer the question. First we have a student records structure [CODE]typedef …

Member Avatar for ashlock
0
112
Member Avatar for rsashwin

Hi guys, I am implementing a singly linked list. The thing is whenever my str_temp goes above 12-15 elements, i get this error malloc: *** error for object 0x1099008b8: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug …

Member Avatar for mazzica1
0
156
Member Avatar for gouki2005

I want to fill a Drop-downlist with a list look heres my list code [CODE] public List ListaEmpresas(){ SessionFactory factory = HibernateUtil.getSessionFactory(); Session session = factory.openSession(); Transaction transaction = null; transaction = session.beginTransaction(); Criteria crit = session.createCriteria(Empresas.class); List empresas = crit.list(); List list = new LinkedList(); // Doubly-linked list list …

Member Avatar for gouki2005
0
134
Member Avatar for beeho

Hi all, I'm having a problem here!! I've attended a lecture on Implementation of stacks in c++ using arrays and it wasn't really hard to understand, but now I'm supposed to know how to Implement a stack using linked list, that's the problem. help please?:confused:

Member Avatar for beeho
0
281
Member Avatar for lo0lo0999

/* I write this pro in single linked list useing stuck how i convert it to class.. #include <cstdlib> #include <iostream> #include <string> #include <sstream> using namespace std; struct studentinfo { string FName; string LName; int no; int age; struct studentinfo *next; } *head=NULL; void add_studentinfo(int s); void print_list(); int …

Member Avatar for thines01
0
99
Member Avatar for methosmen

I'm new to programming and C++. I've managed to succesfully insert multiple nodes from front. Problem is that when printing it starts with the latest node and goes "backwards". I would like it to start with the first node and print forward. Therefore I would like to insert new nodes …

Member Avatar for methosmen
0
274
Member Avatar for Stazloz

Having issues creating table using chain hashing (linked nodes). The program compiles, but is crashing during execution. I admit I don't really know what I'm doing since I havent really used inked lists in forever. A lot of this code I do not expect to work right away, such as …

Member Avatar for Stazloz
0
805
Member Avatar for junsugal

This is the only part of my assignment that has problem. Can anyone tell me what's wrong? I debug it, it shows me NullPointerException... please give me a hint, i urgently need this to be done. Its due today. So, I am supposed to write a method captured that will …

Member Avatar for NormR1
0
168
Member Avatar for atramposch

[CODE]public Node<E> remove (int index)[/CODE] i need to recursively implement this method. Node<E> nodes contain two fields, next (a reference to the next node in the linked list) and element (a reference to the data it contains) [CODE]public E element; public Node<E> next;[/CODE] Do not worry about the checking for …

Member Avatar for atramposch
0
2K
Member Avatar for AbEeR Q8

Hello ; I need a help in my home work , I have to write the program that prints the number of clock ticks it took the program to sort the data the main part is already given , I have to wright the functions this is my program :: …

Member Avatar for raptr_dflo
0
124
Member Avatar for Santi1986
Member Avatar for N1GHTS
0
96
Member Avatar for mary786

The Question is : Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set …

Member Avatar for NormR1
0
205
Member Avatar for pnoylover

[CODE]#include<iostream> #include<string> #include<conio.h> using namespace std; struct node{ int num,ages; string name,skills; struct node *link; }; typedef struct node *nodepointer; nodepointer add(nodepointer &head, int nu, int age); void str(nodepointer &head, string na, string ski); void DeleteFront(nodepointer &head); void display(nodepointer head); int main(){ nodepointer head = NULL; int c,nu,age; string na,ski; …

Member Avatar for raptr_dflo
0
202
Member Avatar for fatzky_04

Searching a circular linked list: Give a procedure in C, say ‘searchcircular (list,x) where the search stops when every element in the list has already been visited and the next node pointer points again to the first node that was earlier visited.

Member Avatar for Ancient Dragon
-2
85
Member Avatar for nadavr

Hello, I've received an homework assignment to create an array via linked list. All went well until the compilation part where i get continuous errors. Seems most of the problem is that certain classes (DSA_array) doesn't recognize the existence of other classes and their member functions (DSA_list). Here's my code …

Member Avatar for Fbody
0
128
Member Avatar for Motorider

I just finished a site that list three zip codes as a service area. when the site is viewed in smart phone browsers the three zip codes become linked to Google maps or it tries to offer the zip as a call now phone feature. when the wrong zip is …

Member Avatar for Motorider
0
95
Member Avatar for wnr78ta

Hi I am doing an assignment and my professor gave us the code for a copy function for a doubly linked list. The function should copy list into another empty list and if the list being copied is empty it should just return and exit. Here is the code my …

Member Avatar for wnr78ta
0
919
Member Avatar for coolbeanbob

Hello all, I have created an array of linked lists called hash_array[]. I am trying to write a search function. I am getting compiler errors on line 7 & 9. They are below. Line 7 warning C4018: '<' : signed/unsigned mismatch Line 9 error C2784: 'bool std::operator ==(const std::list<_Ty,_Ax> &,const …

Member Avatar for triumphost
0
81
Member Avatar for zo0oda

[COLOR="Red"]hello.... I'm new member and I'm so happy that i found daniweb.com to get some help from you my friends.... i need help in solving this problem...[/COLOR] •Select one program of your choice that implements Single or Double Linked List in C++. Make sure you use class in your program, …

Member Avatar for Narue
0
116
Member Avatar for pnoylover

can anyone help me get an idea on how to add or subtract numbers in linked list for example i input the number 1,3,5 in order the display will 135 then i input the plus sign(+) then the input will 45 it will always add the 1st and 2nd number …

0
62
Member Avatar for wnr78ta

I have a simple doubly linked list for a class I am in and I keep getting a seg fault on my last line of code, no matter what i make it. I can put a bunch of random couts and it will print them all then on the last …

Member Avatar for wnr78ta
0
718
Member Avatar for fatzky_04

HELLO! There is no error and it runs, but it doesn't show my desired output. What is the problem? [CODE]#include<stdio.h> #include<stdlib.h> struct list { int data; struct list *ptr; }; int main() { struct list *clist; struct list *top; struct list *tmpptr; int i; clist=(struct list *)malloc(sizeof(struct list *)); top=clist; …

Member Avatar for raptr_dflo
0
102
Member Avatar for Rez11

I have this assignment to do. Its been about a year since I messed with c++ and I've been refreshing my brain on the subject. The assignment is this : Your assignment is to write a program for a computer dating service. Each client gives you his or her name, …

Member Avatar for jmichae3
0
199
Member Avatar for fatzky_04

How does the functions for creating nodes can be used to create a linear linked list with n nodes? The linear linked list that will be created will be assigned values from 1 to n, right? The newly created linear linked list is returned by the function create linear() below. …

Member Avatar for mazzica1
0
110
Member Avatar for javedmirza

AOA Dear fellows i have code in which i uses linked list.when i compile that program the compiled file run but not work. I write this code in Dev c++. [CODE] #include <iostream.h> #include <string.h> #include <stdlib.h> using namespace std; class Node { public: int value; string Name; Node * …

Member Avatar for raptr_dflo
0
242
Member Avatar for eRayven38

Hey Guys, I am really trying to get into List-Implementation. Everything I wrote works fine except the "delete Element at Position" funktion. With the iterative Implementation there is no problem, everything works, but I want to do a recursive Version. This is the Task: Invent an algorithm which becomes a …

Member Avatar for deepu.sri24
0
1K
Member Avatar for greenq

I am implementing Selection sort in doubly - linked list. I have to sort list by surnames by finding smallest element and inserting it into beginning of the list But there are some troubles when I run my program I have NIL exception in Sort Method in while loop. Help …

Member Avatar for Taywin
0
2K
Member Avatar for woodmaj

Write a program that tells you if the expression entered is a tautology or not. Assume that you have no more than three propositional symbols in your expressions -- call them P, Q, R. You must use the linked list implementation of the data structures needed. The above is my …

Member Avatar for JamesCherrill
0
537
Member Avatar for delifion

Hi, this is what i'm trying to do [icode] class a { private: string attribute; string p_msg; public: string& getAttribute() { return attribute; } }; [/icode] above is the class, i want to call function getAttribute() from class a is a linked list: list<a*> aa [icode] void sortFile(Manager& manage, const …

Member Avatar for Nasas
0
151
Member Avatar for AmerJamil

i'm beginner in C++, please help me in display function to display the linked list of my following program thanks [CODE] #include <iostream> using namespace std; template< class T > class Lnode { public: T data; Lnode< T > *next; }; template< class T > class List { public: int …

Member Avatar for mazzica1
0
155
Member Avatar for smmcfarl

I am trying to make a program to add, delete, and print a sorted linked list. I have tried many different things and now I am getting a Segmentation Fault so I was wondering what I am doing wrong? Here is my code so far: [CODE]//ItemType.cxx #include "ItemType.h" ItemType::ItemType() { …

Member Avatar for raptr_dflo
0
449
Member Avatar for ronthedon

Hello All, I am having a problem making my program display and output correctly. When i run my program my count will display but my word will just give me some kind of line. Can you please help me correct this? Thanks Ronnie [CODE] #include <iostream> #include <string> #include <iomanip> …

Member Avatar for vidit_X
0
216
Member Avatar for korobaton

SO YEH MY problem is its not reading the whole file and inputing it to the stucture.. i believe that the problem lies in the adt.( the last source code on the bottom) in the private adt search function, insert function, and traversal..... ive been wreking my brains out trying …

0
158
Member Avatar for ezekit

SO im trying to get this source code transformed to a double link list it has two nodes sentinel and header....the source code was used to be a singly linked list..... nyhow i cant seeem to get this whole thing right..... it works fine when it was on its orginal …

0
97
Member Avatar for k_arjun

Hi, I am a newbie to coding. I am trying to implement a graph in the following format. User input: v1 v2 edge_cost 1 3 10 1 2 20 2 3 40 3 1 30 I am storing the graph as an adjacency list, so that the output should be …

Member Avatar for k_arjun
0
874
Member Avatar for friendskhaled

Please Help me I can't start with this project ! Implement a city 'database' using unordered lists. Each record contains the name of the city (a character string of variable length), the mayor of the city and the co:ordinates of the city as integer x and y, Your system should …

Member Avatar for masijade
0
270
Member Avatar for Warhead88

Hi, Can anyone show me or point toward a link with a decent example of a hash table using linked list. Thank you ,

Member Avatar for Warhead88
0
336
Member Avatar for rutwvu

I am currently working on a project where we must read in a file and then print it back type justified. There must also be a specific number of characters per line based upon user Input with the extra characters being distributed spaces. I am reading in each character from …

Member Avatar for Ancient Dragon
0
190
Member Avatar for Braindead90

Hi, I am trying to work on creating a linked list of player in a game, but I have not written code in a while and have no idea what I am doing wrong, can you please help with suggestion of what I did wrong or idea of how can …

Member Avatar for jmichae3
0
192
Member Avatar for corby

i have this code for adding a node after the previous node, but valgrind is saying that there is a memory leak of 16 bytes, can someone please help me identify where the leak is? i think i didnt assign a null pointer somewhere but im not sure exactly where …

0
119
Member Avatar for jeevsmyd

I'm new to generic programming and I just cant figure out what is wrong in this . The program is supposed to make a linked list using class. I have used 2 classes so that a single object of class LL can be used to manipulate a linked list . …

Member Avatar for mike_2000_17
0
134
Member Avatar for ankit.4aug
Member Avatar for ankit.4aug
0
223
Member Avatar for ronster342000

I am writing a program that reads customer info from a file, then reads transactions from another. I am building my ADTs for this as I cannot use templates for this class yet and have a cpl of issues. The linked list contains the clientID as an int and a …

Member Avatar for MonsieurPointer
0
246
Member Avatar for CrazyMisho

ok i try to write a linked list of objects from one class here is the the class: [CODE] class detail{ int code; string unit; string name; float price; public: detail(int c, string u, string n, float p); int get_code(){return code;}; string get_unit(){return unit;}; string get_name(){return name;}; float get_price(){return price;}; …

Member Avatar for Chilton
0
147

The End.