2,180 Topics

Member Avatar for
Member Avatar for power_computer

Ok, I am trying to figure out how to purse this current project which deals with dynamic allocation and linked list Here is the information I am given the following two structs [code] struct employee { int ssn; string name; float hours; assignment * list; }; struct assignment { string …

Member Avatar for power_computer
0
217
Member Avatar for liemonline

Hi, I'm a beginner to C++. I'm writing a linked list template but I get this error: 1>Tester.obj : error LNK2019: unresolved external symbol "public: __thiscall List<int>::~List<int>(void)" (??1?$List@H@@QAE@XZ) referenced in function _main 1>Tester.obj : error LNK2019: unresolved external symbol "public: __thiscall List<int>::List<int>(void)" (??0?$List@H@@QAE@XZ) referenced in function _main I'm using Visual …

Member Avatar for jonsca
0
1K
Member Avatar for adelphe

[CODE]void menu() { int userinput; static value *head = NULL; static value *tail = NULL; cout << "1 - Insert value" << endl; cout << "2 - Print list" << endl; cout << "3 - Delete value" << endl; cout << "4 - Quit" << endl; cout << "5 - …

Member Avatar for abhi_elementx
0
111
Member Avatar for crystality

Hello! I'm getting this infamous problem: [B]Segmentation fault (core dumped)[/B]. Not sure what's going on. ='( Please help! I've red-ed and bolded the parts that I think are problems. In the following class, I'm trying to create a class called 'BucketHashTable'. I want to create an array of known size …

Member Avatar for abhi_elementx
0
231
Member Avatar for shakunni

I need to read data from a flat file [find below] into a linked list. Each line is a record and each record needs to be read into a different node. After I open the file using fopen(), I have the following problem: 1) How do I move from the …

Member Avatar for gerard4143
0
105
Member Avatar for johndory

Hello, I really need your help. I am writing a program to create a polynomial using linked list. The program is to perform different operations such as addition, subtraction, multiplication. I am however having problems setting the coefficients of this polynomial. I have an idea on how to implement the …

Member Avatar for fireprogramer
0
4K
Member Avatar for Gem74

Hi, I am trying to build a linked list, I have the following, and I get 4 error messages, ListNode, NumberList, and head undeclared, and then syntax error, please help. #include <iostream> #include <fstream> #include <ctime> #include <string> #include <cstdlib> //#include "input_data.h" using namespace std; class Node { public: int …

Member Avatar for jonsca
0
151
Member Avatar for .11

I am currently building a Polynomial linked list. Classes [B]Node[/B], that has a Term and a Node next. [url]http://www.boomica.com/Node.java[/url] [B]Term[/B] with a coefficient and exponent. [url]http://www.boomica.com/Term.java[/url] [B]Polynomial[/B] [url]http://www.boomica.com/Polynomial.java[/url] [CODE]public void addTerm(Term nomial) { Node temp = first; Node toAdd; if(isEmpty() || (temp.getTerm().compareTo(nomial) <= 0)) { Node newFirst = new Node(nomial, …

Member Avatar for .11
0
794
Member Avatar for iamsmooth

So I have these nodes I'm trying to sort as such, but it's not working. This is psudo code: Node first = new Node(23); //previously construted node [code] put method(newNode) { Node traverseInOrder = first; while (newNode > traverseInOrder) { If (traverseInOrder.successor != null) { traverseInOrder = traverseInOrder.successor; } else …

Member Avatar for iamsmooth
0
149
Member Avatar for icu222much

I have created a linked list in Java, and now I am trying to convert my program to C++. When I try to compile, it gives me the error saying that 'next' uses 'CarNode' which is being defined. I am wondering if there is any way around this? Java: [CODE]public …

Member Avatar for VernonDozier
0
193
Member Avatar for Gem74

Please help, I don't know why it is not reading the file. I am working in VS C++ 2008, I saved "input_data.txt" in the header files, see below. What is wrong? #include <iostream> #include <fstream> #include <ctime> #include <cstdlib> #include "input_data.txt.h" using namespace std; class Node { public: int x; …

Member Avatar for Fbody
0
245
Member Avatar for gedas

Hi everyone, Well I come to a point that I have run out of ideas and time and I’m going to ask for help from anyone that can help. I hope that there will be someone that could give me a hint how to solve my problem. About my problem …

0
93
Member Avatar for Raghusys

I have been told to write a c or c++ program for TCP server client program with some conditions that is listed below: You are to implement a synchronization server managing barriers. Your synchronization server should be a stand-alone single threaded process that continuously awaits requests from other processes (the …

0
73
Member Avatar for shakunni

Searching a linked list linearly is very inefficient. Is it possible to use binary search on linked lists?

Member Avatar for shakunni
0
105
Member Avatar for gretty

Hello I am not sure if my function below will completely delete a linked list. I am worried it will delete every element of the list except for the head(first node)? For example; If I have this linked list below [QUOTE] L -> 1 -> 2 -> 3 -> 4 …

Member Avatar for mrnutty
0
87
Member Avatar for ham130489

I am working in Linux 2.14 kernel, and I have an assignment. I want to save for every process , the files it opens and closes , and the time he did that. for example : for process aaa : opening "file1" opening "file2" closing "file1" opening "file3" closing "file3" …

Member Avatar for gerard4143
0
185
Member Avatar for drake2212

I am having an issue inserting the word into the correct list. Whenever I place a loop that loops while the file isn't at the end I get an infinite loop. Can I get some pointers on how to fix this? Here is the text file I am using: I …

Member Avatar for SriHanuman
0
504
Member Avatar for suchita

i want to know the program how to insert at the beginning of a circular linked list in C.

Member Avatar for subhashkataria2
0
110
Member Avatar for kesh1000

hi every one i am having problem in accessing my 2d linked list..i am able to get a function in a 1d linked list but this is quite confusing.please if some one could give me a basic algorithm which i could work with i would appreciate it...thanks the function i …

Member Avatar for Ancient Dragon
0
98
Member Avatar for DazednAngry

I am working on an assignment and I need a bit of help. I am using a double linked list to find roots of polynomials, the list has a trailer node only. I can't seem to get it to create a list. I figure I am just missing something small …

Member Avatar for BestJewSinceJC
0
131
Member Avatar for s11049151

Hi Friends, Can you please help me write 3 functions in C++. It's based on a 2 dimensional linked-list The 3 functions that i have left to write are: [B]1.get_data: If data retrieval is successful return true otherwise return false. 2. update_data: This function updates the data located in the …

Member Avatar for Labby Tisha
0
568
Member Avatar for gretty

Hello I have 2 ways to delete a linked list, which one is correct? If I have this linked list: [QUOTE] list = 1 - 2 - 3- 4 [/QUOTE] Which function will delete list correctly? 1. [CODE] void destroy(node * & list) { while (list != NULL) { delete …

Member Avatar for gretty
0
80
Member Avatar for brijendra_kumar

how we can check a linkedlist of char have a palindrom or not but without distrubing pointers of linklist

Member Avatar for Tom Gunn
0
95
Member Avatar for shristi

Hi...i am supposed to implement min heap,deap,leftist tree using linked list in java..i can nly get the codes which are implemented using arrays..plz direct me by giving the site address r if anyone has the codes send it... thanks in advance

Member Avatar for masijade
-1
95
Member Avatar for gretty

Hello I have a task to perform an addition of 2 Big Integers. Each Big Integer is stored in a linked list in reversed order. [B]Is my add function correct?[/B] For eg; we have 2 Big Ints to add together [QUOTE] First BigInt = 245 { strored in the linked …

Member Avatar for gretty
0
410
Member Avatar for kapiljain469
Member Avatar for brijendra_kumar
Member Avatar for brijendra_kumar
0
52
Member Avatar for tiara

Hello guys.. I am really new to OOP (object-oriented programming) with C++. I am trying to make a simulation window program. I have a bit confused about apply linked-list inside the class. I mean, I am trying use linked-list to do adding item menu. Yes, I make the lists of …

Member Avatar for tiara
0
73
Member Avatar for Fire00f1y

Unfortunately, I couldn't find a suitable thread already so please forgive me if there is one already... but! This was a project due today which I just bit the bullet and left out one part of. Here is my problem: I am building a circular doubly linked list with a …

Member Avatar for ~s.o.s~
0
172
Member Avatar for nola_Coder

Hello... This is my last assignment from my Data Structures class. I turned it in and got a good grade, but it still has one problem that I am unable to pinpoint. The assignment is as follows: Create an alphabetical linked list from a .txt file containing various names. (1 …

Member Avatar for nola_Coder
1
168
Member Avatar for edwar

i've writtn a code in c and it works well, so i tried to write the same code but in c++, ofcourse i need to change some functions to cpp, i did that, but when i run the program i got the follow error : (a function-definition is not allowed …

Member Avatar for Ancient Dragon
0
93
Member Avatar for tones1986

Hey all. I have worked with a project to create a basic student database/registration system for the past 4-5 projects... slowly adding more functionality or using different containers and classes etc. For this next project, i am to use the code from a website online which contains all the nescessary …

Member Avatar for Vincenttalent
0
169
Member Avatar for WethiL

Purpose of this program take base and two number then multiply that numbers in that base.I used Dev-c Shed compiler for gcc.It takes the numbers and base from text in the attachment.Please help....It doesnt have syntax error but it has logic error... [code=c] #include <stdio.h> #include <math.h> #include <malloc.h> #include …

Member Avatar for Dave Sinkula
0
113
Member Avatar for hangulagerson

1. Write a program to implement a static circular queue. It should include the following functions: i) Enqueue – To add an element to the end of the queue [4] ii) Dequeue – To remove an element from the front of the queue [4] iii) IsEmpty – To check whether …

Member Avatar for yellowSnow
0
115
Member Avatar for cmsc

I have this linked list. I am sorting the names of the contacts. The head and middle insert part are already working, but when I need to insert in the tail part, the program won't continue, I don't know why. Please Help. Thanks! here's the code : [CODE] #include<stdio.h> typedef …

0
71
Member Avatar for gretty

Hello I have created a simple linked list that allows me to do 3 things; create a linked list, calculate the size of the linked list & print the contents of the linked list. Although my program crashes when I use the functions: - int len(node *L); // return length …

Member Avatar for dkalita
0
93
Member Avatar for manbearpig

First of all I am a student, I'm in a data structures class. Well I'm having trouble coming up with a getNext method to be used in a linked list class. I am trying to write a getNext method that I can to find out if the list contains a …

Member Avatar for Jocamps
0
102
Member Avatar for Tussles

As part of an assignment I have been asked to create a SortedLinkedList class. We have been told that we must use the java.util.LinkedList<E> in order to dervie this class. I understand that I must in some way overwrite the .add(Object) method. I realise that I must in some way …

Member Avatar for ejosiah
0
138
Member Avatar for LaurenR

I need to write a function splitMid that will split a linked list into two sublists of equal size. I have written most of the functions that I need to achieve this and some other things, but I am having trouble getting started on this function. Can anyone point me …

Member Avatar for VernonDozier
0
514
Member Avatar for NICEGUY123

I need some help passing a array of integers into a hash table by chaining. So if the array is filled it that location it will go to a linked list of the index. any ideas on how to get this done. This is what i have so far. [CODE]chainFunc(int …

Member Avatar for VernonDozier
0
94
Member Avatar for DCV

I have an assignment in which I am supposed to manage a linked list of "players" in a hockey "roster." That's not the issue... problem is, I'm trying to make the function in which a new player is added, and I can't even call it. It results in a LNK2019 …

Member Avatar for dkalita
0
150
Member Avatar for pgulbis

Hi all I am in the process of designing a database structure for a very common use: to store client data such as names, addresses, company information, etc. I have been reading up a lot efficient database design and am trying to normalise to 3NF. As I am new to …

Member Avatar for saasaa1
0
219
Member Avatar for lancevo3

I am working on a doubly linked list assignment for my class and I am getting a segmentation fault on my test for the copy constructor. I don't know if the problem lies within my copyList method or my copy constructor logic. Any assistance be great. Here is my header …

Member Avatar for native
0
512
Member Avatar for rsampath

Write a C program that can be used as a database of student’s information for the statistics and computer science department. Populate the database with 10 records. The program should be able to dynamically allocate or deallocate storage for the student’s records using linked lists. The database should have the …

Member Avatar for Grn Xtrm
-1
94
Member Avatar for luskbo

OK, I'm trying to write a program that uses a circular linked list. I have been playing around with a linked list program all day, and kinda understand it. Here it is, and yes it does compile. [CODE] #include <iostream> using namespace std; struct node { char name[20]; // Name …

Member Avatar for luskbo
1
258
Member Avatar for robgeek

Hi guys, Please can someone explain me how would I split a string into groups. In other words, I have a string of numbers, as such: 123456789 I am supposed to store them in linked list nodes as such: node 1: 1 node 2: 2345 node 3: 6789 I was …

Member Avatar for Lerner
0
97
Member Avatar for TigerGirl

Hi I have a method that has a reference to a linked list and an int that is the value. I want to recursively call that value to count and return how often that value is in the linked list. So, here is what I got: [CODE]public static int find(LinkedNode …

Member Avatar for TigerGirl
0
107
Member Avatar for prinju

can any one give me a c program for finding the length of the string and also to compare it with other strings with the help of linked list

Member Avatar for DangerDev
0
91
Member Avatar for shayacov

Hello, I have 3 Combos on a toolbar which i need to bind to sql database (using linq). On my form i have several data text fields. What i need to do is this: Combo1 = bind it to a specific linq query that i make that can bring my …

Member Avatar for kvprajapati
0
87
Member Avatar for lotrsimp12345

Don't think you can pass any parameter unless you create a point in your main. [CODE] template<class T> void my_list<T>::show_sllist(my_node<T>* p) { if(p!=0) { cout<<p->data; show_sllist(p->next); } } [/CODE] Would i have to create a pointer of type my_node in main to show the list. [CODE] #include <iostream> using namespace …

Member Avatar for dkalita
0
104

The End.