2,179 Topics
![]() | |
Like the title says I need help to display a doubly linked list in a forward order. No matter what I do, I can just get it to display in its regular reverse order. Here's the code: [CODE]public class DoubleLinkedList { private Node h; public DoubleLinkedList() { h = new … | |
Hey guys I am trying to work on some linked list stuff and I have my code put together but I wanted to post it on here and just check to make sure I am going in the right direction. Here is what I am trying to do: Create a … | |
//*************************SERIOUS PROBLEM, NOT WORKING****************** [CODE]//DOUBLY LINKED LIST #include<stdio.h> #include<stdlib.h> struct dll { int info; struct dll *next; struct dll *prev; }; struct dll *head = NULL, *tail = NULL, *temp; void append(); void insafter(); void delete(); void display(); void main() { int choice; do { printf("Enter your choice:\n"); printf("1.Append Node\n2.Insert … | |
I optimized very carefully program I was producing by producing the main tight loop functions half a dozen times with various implementation styles. Also i considered amount of passing information in call hierarchy in parameters or letting functions to trust proper initialization of the global variables. I got few interesting … | |
i am new in c++ programming language,i do not understand very well imprementation of linked list,can u help me by providing me algorithme for it | |
Hello Guys, I have implemented a linked list. And my output looks something like dis: ************************************************* The elements in the list : address is = 163196952 ADOC1100250100000119666 address is = 163196968 ADOC1100250100000119666 address is = 163196984 ADOC1100250100000119666 address is = 0 ADOC1100250100000119666 TOTAL NO OF ELEMENTS IN THE LIST ARE … | |
Hello. I have a small problem in my home assignment. A neverending loop occurs, if user enters everything but digits, when I expect him to enter only digits. How do I allow only int type variables to be entered by user? The value user enters is the index number of … | |
Hello there everyone before I post my ( probably not elegant) code I Would like to first give the community an idea of what I am doing. I am writing a grade organizer program to where I can store a test, lab, or homework grade respectively. I have finished the … | |
I have created a linked list which stores data from file. However I got stuck when I try to print the contents of Linked List. The code is below 1.Text File [CODE]102.15.12.10 15.14.106.6 1591 1592 bit_torrent 102.15.12.10 15.14.106.6 1591 1592 bit_torrent 102.15.12.10 15.14.106.6 1591 1592 bit_torrent 102.15.12.10 15.14.106.6 1591 1592 … | |
1. Create a doubly linked circular list in Java. Each element in the list contains a data which is an object of a Student class and two links, next and previous. 2. The Student class contains two class fields only: • name - The first and last names are in … | |
My goal is to implement a sorting into a linked list. I have everything working thus far, but I'm a bit stumped as to how I need to change my insert function in order for an element to be placed in the appropriate location. Here's my code thus far: [CODE] … | |
Hello Python forums, I started working with Python recently and picked up a book. The book stated discussing using the ctypes module in python which is slick because it's exactly what I need to be learning. I started trying to test my knowledge by implementing a simple, singly linked list … | |
hello to everybody I have a linked list that contains objects each object contains two String field I want to know how to check if the object that i want insert is already exists in the linked list thank you | |
im trying to take an inputed file and use a linked list to read it and display the most frequently used word. Anybody know how to do it? [CODE] import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.*; public class mostFrequentWord { LinkedList<Word> list = new LinkedList<Word>(); public void Read() throws … | |
Alright I'm having a heck of a time figuring out what's wrong with this code. It throws an error of [quote]Error 1 'System.Collections.Generic.Dictionary<Assignment7.Station,int>' does not contain a definition for 'ElementAt' and the best extension method overload 'System.Linq.Enumerable.ElementAt<TSource>(System.Collections.Generic.IEnumerable<TSource>, int)' has some invalid arguments7[/quote] However, when I was writing the code I … | |
I'm going crazy. I've been trying to a linked list of a struct (which stores some strings and a character) however I've had no luck. It's just not working and I've been working on this for hours on end. Note: StorePtr is a pointer to the Store struct (which stores … | |
Hi, I'm writing a multi-threaded script with wxPython as a GUI toolkit. About 50% of the time, I can run my script flawlessly. The other 50% of the time, I get [U]huge[/U] errors regarding wxPython that I cannot seem to decipher; however, I think it could possibly be a problem … | |
Hello Guys, I have found many source codes to implement linked list. But all are inserting or deleting the node values after user's choice. I dont want that. Insertion should happen dynamically. I have a client program running on another system. I fetch the data from that system through my … | |
Does anyone know how to create circular linked list whose links are numbered from 1 to n specified by the user? | |
Hello I am working on a project for my roommate that involves reading in a text file that has x's and o's. The x's mean a wall and the o's mean an open path. The maze begins at 0,0 and ends at 15, 15. This makes the graph 15x15. I … | |
Hi i need an event handler method to let an user use the 4 arrow keys (up,down,left,right) from a keyboard input ... and also the letters "Y" for yes and "N" for no on the keyboard. [code]import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; //group Albers, Rodriguez, Gonzalez, Leys, Larson, and Aponte … | |
Hey guys! I am new to java and have a newbie question. In a linked list, if I wanted to set the int first = to the first node in the linked list how would I do that. Thank you all in advance for your help!! | |
Hello Friends I'm facing a problem and I can't figure out what is the wrong ( it is [COLOR="Red"]a Run~Time~Error[/COLOR]) I have these two classes [CODE] // singly-linked list class to store integers #ifndef INT_LINKED_LIST #define INT_LINKED_LIST class IntSLLNode { public: int info; class IntSLLNode *next; IntSLLNode(int el, IntSLLNode *ptr … | |
Hiii Everyone i)Show diagrammatically a linked list of 4 nodes, where each node consists of one pointer and one integer data item. ii)Give a declaration of this data structure in a language of your choice. State what language you are using I want using pascal language Please give me quick … | |
hey everyone, newbie programmer here, and i am working on a project to use linked lists, by creating a linked list class. basically i am using old code and modifying it to work with a linked list class. i am using visual studio to debugg, and it seems that my … | |
I have a list from the stl called Clist. It has alot of items in it and one is a double called fVal. I want to insert new nodes in the list in ascending value according to the fVal. I have tried the following code and it works fine for … | |
I'm developing a doubly linked list. Now the way I'm currently navigating it is by using a current position pointer, that starts at the tail and then loops round however many times you need (you'll tell the function) and it will then get to that node. Now, I'm having to … | |
Thanks for any help. Most of this works, but I get a compiler error on lines 60, 84, and 105, where it says [CODE] current = currentStore->link [/CODE] The error reads "assignment from incompatible pointer type" It runs, but in the printStores function when i gets incremented on line 81 … | |
I am making a linked list template. a can search a string input and determine if it is an int. i can declare a node of type int or string. when i try to add to my list, my string node cannot point to an int node and vice versa. … | |
Hi all! So our T.A. gave us a function to use in our programming assignment as follows: [code=php] struct node *delete_from_list(struct node *list, int examnum) { struct node *cur, *prev; for (cur = list, prev = NULL; cur != NULL && cur->examNumber != examnum; prev = cur, cur =cur ->next) … | |
![]() | [QUOTE=Narue;1174132][B]>a.) You mean square root of N?[/B] Assuming you're talking about my "O(# of powers of 2 below n)" estimate, no, I really do mean powers of 2. The square root of N is close at first (but not quite right), and it gets worse as N grows. [B]>f.) As … |
would the code below work for an hash table as in searching prior to inserting part... would it actually step through the table as in through the nodes then to whatever cells the nodes point to ... i have no other way of checking just yet .. coding still in … | |
This is a program im writing for class. Here is the exception im getting: Exception in thread "main" java.lang.NullPointerException at LinkedList_final.insert(LinkedList_final.java:72) at LinkedList_final.main(LinkedList_final.java:247) Basically, my program reads a text file and parse a string. And then, add the string to Linked list. Thank you for your time and any help … | |
Hello, I am currently working on a project that requires me to write write a program that adds, subtracts, multiplies and evaluates polynomials. I am required to use linked lists of nodes. I am stuck on writing the code to input the polynomial. I understand how I will input each … | |
okay i need some help with this...i'm creating a graph program..the problem is the linked has to be user specified...i manage to create a linked list..i don't know how to create another one...its some sort like this : 0 1 2 0 - - > created this 1 - - … | |
I have to use a queue in an solitaire assignment, but I'm having some trouble using the linked list Queue class that I made. It won't take arrays at all. [code] class Testing { public static void main (String [] args) { Queue testlist = new Queue(); // testing Queue … | |
Hello, and thanks in advance for any help I can get. This is part of a larger program for homework. Things were working when I called "addVacantStore" the first time before I wrote the search function. I then called it twice more to set up to test the search function. … | |
![]() | Hi, My program keeps coming up with an Access Violation after I moved the code manipulating my linked list from the main function to a sub function. Looking at it with the debugger, I found that the sub function destructs the linked list, and then the main function attempts to … ![]() |
create a C++ program, using a queue that will interface to your car, to read out to you directions as you drive. You have been at a hockey game at Rexall Place. So you ask your GPS for a route home to your residence at King’s. You enter each instruction … | |
I have finished writing a program that uses Linked lists and reads in input from a txt file. When the program executes there is no output. I have been going through the code for awhile now and there are no syntax errors and i can not seem to find what … | |
This is the program i'm trying to develop. It's not an assignment or anything. I'm just a newbie trying out new stuff. But I'm getting frustrated with this. [CODE]#include <iostream> using namespace std; //========== struct ========== struct nodeType { string song; int rating; nodeType *link; }; //------------------------------------------------------------------------------ //========== function ========== … | |
Hi Programmers, Please help me in my project constructing a Phonebook program in c using linked lists with add,search,view and delete function. | |
I'm just a 4-months newbie in C++, and I have an assignment to do a small phonebook program for DOS or FreeDOS. This is what i got from days after searching: This is CTelrecord class that would save every record in details [CODE]class CTelRecord { private: int szTime; char szName[_MAX_NAME_LEN_]; … | |
Hello everyone, Firstly i'll like to introduce myself to the forum. HEy... Ya my need is tat i need a super simple ebook(FREE) on C programming and covering advanced aspects of C like C - linked list , c-graphics and C-BITS... help! /************************************************** **************************************************/ | |
anyone can do case statment for stack , queue and linked in one program plz ex: void main () do { cout << "1 - stack"; cout << "2 -queue"; cout << "3 - linked list "; cout << "4 - stack with linked list"; cout << "5 -queue ....... … | |
the inputs are these computer 21 sabanci 4 sabanci 6 university 6 university 12 computer 17 university 3 computer 9 computer 6 sabanci 2 university 9 problem occurs at third line when the input name1 is equal with the previous input name1. Really thx for helping. Sorry for mess. #include … | |
Hello, I want to make a linked list program consisting of one main link, and each main links have sub link. [CODE]Main 1 -> Main 2 -> Main 3 -> ... -> Main N -> NULL | | | | Sub 1-1 Sub 2-1 ... ... | | Sub 1-2 … | |
I am putting together a database with users, items, and tags. I have three tables to support this structure. The first is the "items" table, which contains all of the details about each individual submitted item. The second is the "tags" table, which has two columns: tag_id and tag_text. The … | |
how do i generate all the topological ordering of (directed acyclic graph), i have written a program that can find 1 topological ordering, the problem is once i am finished i am left with a empty linked list as my algorithm involves deleting the traversed nodes which is crucial for … | |
Hi everybody! I'm currently working on an assignment for school. I'm creating a linked list (a line at the liqure store to be exact) and I'm a little stuck. Part of the code: [CODE] public void ekspederKunde() { System.out.println("Velkommen til polet! Vennligst vis gyldig legitimasjon.\n"); if (fremst == null) { … |
The End.