2,180 Topics
![]() | |
An encoded file will be decoded by the program using a key input from the user. This key is a sequence of numbers that will scramble the message in the file into its appropriate order. I have to use linked lists for this. I already started it, but I can't … | |
I am trying to implement a queue based on a Linked List that I had to write previously. It is templated and for some reason I am getting the following error using g++ when I compile: [CODE]g++ LinkedQueueMain.cpp -o LinkedQueueMain /tmp/ccqwStpK.o: In function `main': LinkedQueueMain.cpp:(.text+0x2ee): undefined reference to `LinkedQueue<char>::operator=(LinkedQueue<char> const&)' … | |
Hi everyone, I have a problem with debugging a dll file. I'm trying to convert the epanet2.dll (EPANET: a free source-coded water resource program) into a 64-bit dll file for my project. When compiling, errors coding LNK2001 and LNK2019 occurred many times. error LNK2001: unresolved external symbol ... error LNK2001: … | |
I have this problem that states that: LL be a doubly linked list that has 2 headers L and R. Each record has: llink, data, and rlink as field. So llink is the prev pointer and rlink is the next pointer. Here is the code to reverse the list, but … | |
Can someone help me create a function in a linked list program that replaces an element in (I) place with an element a user enters? here is the sudo code I tried to implement but Im kinda lost. this is in my header file -> [icode]typedef int el_t; // el_t … | |
I have a flat file database program I'm writing using SQLite3 and I've run into a problem and a question. Problem: I have the various fields on the forms linked to the results of my queries using databindings. They all work just fine except for 2. They are pulled from … | |
I was wondering if anyone happens to know any good c++ books to learn linked list (single, double, and/or circular)? Something that has explains with code to show how to do it and explanations to the code if possible. | |
I was wondering in a doubly linked list how do check to see if the initial list you have is Null? This what I have (would this be correct): [code] node *middleOut(struct node*LL) { node *current = LL; if(current == NULL) { cout<<"empty list"; } //Rest of code is down … | |
I have this problem where you have a list of odd or even number of items in doubly link list and you have delete the middle one. For the even number one you delete the two middle elements, say you have 1,2,3,...,10 you delete 5 and 6, and for the … | |
Im having real trouble seeing this, how do I delete something out of a linked list if it is already there? My current delete function just deletes everything out of the list. the text file contains numbers like this: 75 85 95 25 35 75 85 95 25 [CODE]#include <iostream> … | |
I have an assignment to write a pseudo-code to have a list pointed by H (list of numbers) that have to be copied to a list pointed by H1 (only the odd numbers need to be copied). Can anyone tell me if I am wrong on this (not a working … | |
I am brand new at C++ and I have a programming assignment I have to do. I have to create a directed graph and perform a breadth-first traversal. I have to use an adjacency linked list implementation without using any existing libraries as Standard Template Library. Where do I begin? … | |
First let me describe the program All it does is pull in some chars and stores them in a linked list of stacks. I have the code written to pull them in but when I need to print them I dont know how to go backwards without deleting the node. … | |
Im just getting garbage in the output. It outputs the correct number of items but its not the right numbers. Im not sure why it is happening. The text file just has numbers like this: 12 34 56 34 67 23 64 23 [CODE]#include <iostream> #include <fstream> using namespace std; … | |
How do I get the data from file into the Insert function? Or more general how do you get data from a file and put it into a linked list? [CODE]#include <iostream> #include <fstream> using namespace std; class List { public: void Insert(); void Print(); }; struct node { int … | |
Im trying to find out if something is in this linked list function and if it is to return true and if not return false. How do you find out if ThingType thing is in the list? [CODE]bool Thelist::Search(ThingType thing) const { Node* current; current=listPtr; while(current->thing != listPtr->thing) { } … | |
I have got stuck with a very basic prb in Linked lists, i m familiar with array, as in array to compare two elements of the array u can simply use their position in the array since they are all positioned in a consecutive manner in memory like: if(arr[2]<arr[3]) //do … | |
Hey guys, i got a assignment which requests me to get 7 fields of data from an input.txt and sort them and output them. Is there other ways to do it other than making 7 Linked List , sort one list and replace the rest of the linked list with … | |
The program I am working on deals with nested linked lists. I have a Olympics class that uses a linked list for events. Events have their own class with a linked list of contestants of a contestant class for each event. I don't understand why I'm getting these compile errors: … | |
This program is a double-linked list in C for my System's Software class. Everything worked fine, until I coded the delete() and insert() functions. The program compiles and executes on a window machine using Dev C++. It also compiles without any errors or warnings on a linux machine using gcc … | |
I have a class named Contestant which holds all the info on a person playing a game. Then I have a game class for all the different games a contestant could be playing. My linked list in the game class is defined by the contestant class. I need to swap … | |
I have a recursive method that traverses a linked list for a first name or last name then deletes the node from the list. This is what I have: [CODE=cplusplus] void game::DeleteR(string first_name, string last_name, ListNode* &node) //throw (ContestantException) { /* See if we are at end of list. */ … | |
When I run my switch, choose option 3, my program crashes. Would anyone know how to solve this? I want option 3 to [ICODE]delete node[/ICODE] from my [ICODE]linked list[/ICODE]. I do not know how to do classes. Please don't suggest a fix using classes. --------------------------------------------------------------------------------------------- my text file looks similar … | |
Hi, i am facing a problem with storing data into linked list. I have previously store the data read from the text file into an array but now my assignment require me to store all this record into a linked list. Can anyone help? May i know how to do … | |
When I excute my program and open up the text file, it only reads me the 1234 then junk below it. I have no clue what do. Anything is welcome. Below is my .cpp file my text file looks something like this 1234 jack hammer 75.00 .45 10 5678 Daffy … | |
First I just wanted to say thanks for all the help everyone has provided for me before. I'm sure you wanted to reach through the internet and strangle me :) . I having some difficulty with understanding/implementing a linked list class with another class. Just something as simple as interacting … | |
Hey all! I am having a problem copying Linked Lists. My Struct has the following fields. list->data list->number list->exit Exit is the tail, data is the head. I tried doing this.. copyList->data = list->data but it resulted in a fail of epic proportions. Can anyone give me a hand please? | |
Hello, I am newbie of C++ Below is my code, I want to implement the function "printall " to print out the " contact" data in Dlinked_list. but I faced a problem to call out the function of class "Contact" of "print". for example: list.insert(new Contact("Ada", "ada@ust.hk", "12345678")); then the … | |
This is the header file provided by my instructor. [code] // // unsortedlist.h // #ifndef UNSORTED_LIST_H #define UNSORTED_LIST_H struct UnsortedListNode // Description of list node { char ch; // Stores one character input from file UnsortedListNode* nextPtr; // Stores address of next node }; class UnsortedList // Linked list implementation … | |
Hi Does anybody knows what is wrong with taht code? Why it says it is empty link list? It should fill with the numbers I enter. Could anybody help to answer the question? Thanks [CODE]#include<stdio.h> #include<conio.h> struct Node { int number; struct Node *link; }; typedef struct Node* NodePtr; void … | |
I've been struggling with this program for few several days now.. It's an implementation of Data structures. I'm trying to use Linked Lists, Sorting and Searching concepts. [CODE=cplusplus]#include<iostream> #include <iomanip> #include <fstream> #include <cstdlib> using namespace std; class videoShopSystem{ public: bool empty() const; void displayMainMenu(); void menuChoice(int key); void addNewRecord(); … | |
First let me apologize if this is the stupidest question of all time. Next let me introduce myself, my name is Craig and I teach in a school in Resolute Bay, Nunavut, Canada... 600 miles above the Arctic Circle. There are no techs up here to help me with my … | |
how can you make program using a linked list that displays your outputs in ascending alphabetical order? we are only allowed to use: #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> TIA | |
Hi have a problem, this code should read a file and then save it in a linked list, just the <uid><name> from a lie looking like: <username>:<password>:<uid>:<gid>:<fullname>:<home dir>:<shell> I can't find the segmentation fault error atm, but hints on the code would be helpfull. Atfer the insert in user list … | |
The problem: Will not compile, i get the following errors: "invalid conversion from char to char*" "invalid conversion from char to const char*" Program Description: Opens a file and read each character into a linked list [code] #include <iostream> #include <fstream> using namespace std; const int MAX = 30; struct … | |
could someone please show me how i would be able to reverse the printout of a linked list?, i have gotten it to print out in the right order but not sure how to make to printout in reverse. here is my current code, [CODE] void print(node*& head) { node* … | |
Hey, Im having some trouble with linked lists, I have been givin a task where I am asked to crreate a linked list which reads in a random set of chars from a .txt file and stores them in a linked list, then prints them out in a seperate function. … | |
Hi, I've got a method that returns 'null' for a linked list [CODE] public LinkedList<names> Relate(names Student) { return null; [/CODE] How can i get it to return an empty List, so that I dont get a null pointer exception? Thanks in advance, | |
Hi i've got a problem. I keep getting this awesome error "[Build Error] [Project1.exe] Error 1" I copied this source code from [url]http://www.daniweb.com/forums/thread56924.html[/url] I just can't seem to get it to work. can someone pls help [CODE]#include <windows.h> #include <stdio.h> #include <string.h> #include <odbcinst.h> #include <sql.h> #include <sqlext.h> #include <sqltypes.h> … | |
I need helping writing the following code that does the following pls Implement the following String List ADT: A String List is a list (sequence) of strings with the following methods: 1. A constructor that initializes the list to be empty. 2. A boolean isEmpty() method that returns true if … | |
ok let me list the sh!t these ****ing viruses/trojans are giving me: - can't change my desktop, it's changed to a screen saying "OMG YOU HAVE A VIRUS" pop up. -can't search on google, redirect to go.google.com -can't open email, redirrects to hotmail.msn.com -can't open links to some sites -can't … | |
Hello there, I am having trouble with a form/database. I have 3 age groups that needs to be sorted into 3 separate tables. Users fill in a form (dropdown list with the separate age groups) and when they click submit, the data gets sorted in tables on another page. With … | |
The program compiles but is not run right can somebody help plz? There are two parts a class and a main. [code=java] public class LinkedList56 { private class node{ int data; node next; } //create an empty linked list public LinkedList56(){ first = null; } //return true if the list … | |
Can anyone help me with a computer science C++ assignment that i am struggling with? The task is to design and implement a generic reference counted smart pointer class library, and use the smart pointers to create a smart generic linked list class... any help would be greatly appreciated... Thanks | |
I'm having trouble getting my delete function to work for a singly linked list. If I try to delete anything other than the entire list, it deletes everything up to that node. I know there is something wrong with it, but I can't tell what it is. I would like … | |
I'm having to create a program that uses a linked list to ask for X & Y points and stores them in a linked list and then displays those results. My problem here is when it gives me the output I only see the last 2 entries I've made. It's … | |
After spending some time on JSP section of this forum as many before me, I come to the conclusion that we are in need of "proper" tutorial on this topic. This tutorial is not intended to teach you everything from top to bottom, it is just a starting point to … | |
Hello, I am Visual Web Developer 2005 and MS accsess to make a data driven webpage. I have a web page which has a drop down list and a gridview. Both of them are linked to tables in the database and when the user selects an item (user name) from … | |
I am having trouble with the following program. I am trying to create a linked list that behaves like a FIFO queue. I need to be able to add new items to the end of the queue and remove them from the front. My confusion is with trying to use … | |
hey all, i'm a newbie to C++ programming and i'm having some difficulties implementing this singly linked list. what it has to do is accept: nickname email address number of kills and store them in a node of the linked list in order according to number of kills. here's what … |
The End.