2,180 Topics
![]() | |
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 … | |
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 … | |
[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 - … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
Searching a linked list linearly is very inefficient. Is it possible to use binary search on linked lists? | |
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 … | |
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" … | |
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 … | |
i want to know the program how to insert at the beginning of a circular linked list in C. | |
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 … | |
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 … | |
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 … | |
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 … | |
how we can check a linkedlist of char have a palindrom or not but without distrubing pointers of linklist | |
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 | |
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 … | |
how can a linked list can be sorted in less than O(n*n) any algo ?? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … |
The End.