2,179 Topics
![]() | |
I want to write a function to add nodes to the end of my linked list. My problem is that I don't know how I can have a pointer that always points to the first node of my linked list.Forexample if I write [CODE] Gnode*p = new Gnode; first->link=p;[/CODE] when … | |
Hi, I have to write an airline ticket program for my class. My instructor gave us an example of a similar program so I thought I would build and run it to help me understand it better but he seems to have given us code for a program that doesn't … | |
hi every body..... ^_^ i have these problem in linked list and i need some one to answer it please..... Develop menu driven C++ program to manage the College of Science Book Store. Your program should maintain three linked lists: one for books, another one for students and a third … | |
Hey Everyone, I'm compiling a code that reads characters from a file and puts them in a linked list. No problem with the Linked List but my ifstream acts weird. When it reads from the file everything goes somoothly, but at the end, when it reads that last WORD, it … | |
Hi, I am studying algorithms and how efficient they can be. So I have a question concerning merging of linked lists. If I have two linked lists. One is double the size of the other. And and larger one is sorted, where as the smaller one is unsorted. Is there … | |
Hello My program is supposed to "remove" odd indices from a linked list (with the index starting from 1, and the last address of the linked list being 0): The program should print out 13579, but it instead prints out 13268501024526850100872685009929. I know assembly is tedious as hell, but I … | |
I've been playing around with recursion a little bit, admittedly it's been some time since I've used it, and I'm feeling pretty rusty. I was simply trying to recursively reverse a linked list and wasn't getting anywhere and finally google'd some code and came across the below snippet, [code=c] node … | |
[CODE] myLinkedList ( ) { //TESTED head = NULL; last = NULL; cout<<"Linked List is created with default constructor\n"; } myLinkedList ( myLinkedList &arr) { //TESTED if (arr.head == NULL){head=NULL; last=NULL;} else{ head = NULL; last = NULL; temp2 = new node; temp2 = arr.head; while(temp2!=NULL){ insertLast(temp2->item); temp2 = temp2->next; … | |
Hello, everyone. I'm trying to learn MFC so I can create GUI's for a few projects I have in mind. I could really use your help with a few basic problems. I'm attaching a screenshot of my appointment book main window and the other dialog that shows after the ADD … | |
Hello all, I'm having a problem with my program when I try to compile it. It shows the message in the thread title along with a method it doesn't like: extensionRemover(). I've Googled the problem but they were all related to the header file and use of multiple classes. Where … | |
In reguards to the remove function, what happens if you remove and item from the middle of this list? For example, say the list size was 5 (elements 0 - 4) and element 3 was removed. Would element 3 now contain a null value or would everything past element 3 … | |
Say for example I have: [CODE] List<string> itemset1 = new List<string>(); List<string> itemset2 = new List<string>(); // Linkedlist itemsetcurrent [/CODE] Which is declared outside the functions, and must be accessible from all the functions. Now, I have a code like this: [CODE] private void SetList(List<string> list) { itemsetcurrent = list … | |
Hello everyone, I am trying to pre-allocate a certain number of nodes to a linked list, I allocate 10 nodes at first and, if I have more data to store, I'll need to resize it by adding half of the total number of nodes, sort of like 10, second time … | |
I want to do a double linked list that has has in each element one operator(+-*/) and one value of type double. I am having trouble in defining the class of the list. Should I use C++ Class Template Specialization or what? [CODE] include<iostream> using namespace std; template <typename T> … | |
Question 1 How many pointers are needed to build a linked list in a backward manner? a. one [COLOR="green"]b. two[/COLOR] c. three d. four Question 2 Every node (except of the last node) in a singly linked list contains ____. a. the address of the previous node b. the address … | |
I want to write a method to remove consecutive items with duplicate data values from a singly linked list. The method should return the number of items removed. The method should clean up memory as required, and should assume that memory was allocated using new. For example, passing in the … | |
Hello, How can I save a string input as a double linked list in dynamic memory in C++? Thanks in advance | |
Hello,can anybody help me implement the sort() function of a double linked list. The node`s of the list contains objects of type Person: [code] class Person { int age; string name; string adress; }; [/code] And i want to sort all the Person`s by age.I tried implementing bubble sort,but I … | |
I am a newb, do not go to college and am learning Java on my own time. This little project is a learning exercise so I ask that any help just points me toward a right direction. It is a character generator for a table top game, that may or … | |
I want a list that include matrixes (not implementing matrix as a list) . and I will add matrixes when I want. Is it the best way to take a dymamic memory with matrix size(row*column) and add the pointer that reference matrix to the list. But in this way, if … | |
I need the node sorted (selection sort) whenever the data is entered front or end or deleted front or end. How to get it sort automatically everytime user entered a data? countItems() doesn't seem worked to the selection sort... This is my Node class. Mostly no problem... [CODE] public class … | |
I have this problem that I can't figure out, I can't figure out the line statement that needs to go in. Here's the problem [code=c] struct NodeType { int data; NodeType* p; }; NodeType* p; NodeType* q; p = new NodeType; p->data = 18; q = new NodeType; q->data = … | |
I've got a C assignment to make a "Rolodex" project. I wrote out the whole assignment just so you would understand the scope. I'm just getting going on this. Last week's lecture was about Dynamic Self Referential Lists in C, so I get the concept of what I'm supposed to … | |
please any one give me simple code snippet to perform insert , delete, update, search & display operation using linked list. please help me | |
So to accept multiple clients, I am dynamically accepting them, but so that I can handle them(data transfer etc...) I wrote a linked list which so far works fine. I can broadcast a message to all clients fine by looping through my list and SEND->client, fairly standard. But when a … | |
To get to the brunt of it, I have a link list on the left sidebar of my site, each link is just a recordset table value and I used a repeating region to repeat down. Therefore the list of links is essentially a list of recordset table values from … | |
This program maintains a employee's record using Doubly linked list.It was a weekly project submission by me for the course CI 031 .Invloves simple graphics and a login menu where i had used file handling to maintain a record of 3 user's name and their password .So before running the … | |
I would like to implement a text editor . In the design process i have some doubts . Take a text editor like a notepad . We we will able to move directly to any point in the editor which means that a random access is made possible . I … | |
[CODE] private Node<T> addAt(Node<T> node, T value) { if (node == null) { // special case return new Node<T>(value, null); } else if (node.getNext() == null) { // other special case node.setNext(new Node<T>(value, null)); } else if (node.getstuff().getName().compareTo(value.getName()) > 0) { node.setNext(new Node<T>(value, node.getNext())); } else addAtEnd(node.getNext(), value); } return … | |
I want to reach linked list like an array. I write a code like that but i get unexpected result. Main problem is, when i check sizeof(myrecord) value, i get 27 bytes, but actually difference between the records is 32 bytes. Do you know where is the error? [CODE]#include <stdio.h> … | |
Hello, could some please help me with a current project that I'm working on for school? I have the following code, but the output shows unknown address. The following is the description of my assignment, and the code I have so far. Thank you. Write a program that creates a … | |
I am trying to make a circular linked list. I will appreciate if anyone can tell me how to make it better. [CODE] int n = num_people; Node *head = new Node; head->next = new Node; Node *temp = head->next; for(int x = 2; x < n; x++) { temp->next … | |
Creating a program to read a text file full of words in alphabetical order. I then have to read it into a Linked List. The linked list should output total number of words, which I have managed to do. After this it needs to calculate the min and max depth … | |
Hi, I am confused in making circular linked list. This is what I have. CircularLinkedList.h [CODE]#ifndef CircularLinkedList_H #define CircularLinkedList_H class CircularLinkedList { public: void remove(); void set_number_people(int); void print(); }; #endif[/CODE] CircularLinkedList.cpp [CODE]#include "CircularLinkedList.h" #include "Node.h" #include <stdio.h> void CircularLinkedList::set_number_people(int num_people) //This is where I am confused { Node *head … | |
I am not familiar with linked list, can any one help? | |
Hey I was just wondering if I could get some advice from you guys. I'm trying to write basically a cookbook program for my mom. She wanted to put them on the computer to save them and I thought WTH I could write her a program not only helping her … | |
Hi, I was working on Josephus problem, where I have to make a circular linked list and having errors in it. Will really appreciate if anyone can help me. The following method is in Node Class: void link(int num_people, Node* temp) { int n = num_people; [B]head->next = new Node;[/B] … | |
I want database management in C To ADD,LIST,DELETE,INSERT using structures and files..........not in linked list.............. can anyone help me out....because this is the first time to do long and some what complex program for me | |
Hi, I'm trying to do a hashing project using separate chaining. In order to do the separate chaining I believe I need to make a dynamic array of pointers to the linked lists. This is due to the fact the user can specify the hash table size at runtime. In … | |
[CODE]#include <stdlib.h> #include<iostream> #include<conio.h> typedef struct kume1{ int data; struct kume1 *next; }; typedef kume1 *kume1ptr; void insert(kume1ptr *x,int a); void del(kume1ptr *x); int main(){ int t=1; kume1ptr first1=NULL; kume1ptr first2=NULL; int x; int i; for( i=10;i>=1;i--)//ikisi içinde 20 ÅŸer tane random sayı üretiyoruz { x=rand() % 100 + 1; … | |
Hello, I attempted to create a linked list in Assembly which takes the values from x and stores them into the list LinkNode. While it does work properly in doing this, I am unable to get any calls to procedures to work after calling my GetLink procedure. The calls seem … | |
I understand the concept of a binary tree. So I guess, for a programmer defined binary tree, is it basically a doubly linked list except your 2 pointers are your branches? | |
I don't normally post in these kinds of forums and prefer to just google my way through problems, but after 3 hours of trying to solve this, I am beat. I am working on a program that uses a linked list and can add/delete/print out nodes (orbs in this program) … | |
So there's a handsheet that my professor gave me as a guideline to follow. It gives us the prototype of the functions and that's IT. However, when I put in the prototype and fill in the body, an error comes up in regards to a conversion error. Any help? Here's … | |
i have made a bulleted list that retrieves its items from a database dynamically. i want to convert these items into a hyperlink such that each link is for a seperate page. and also i dont want these as linked button. please help. | |
hi everyone.. I have this assignment that I should sort whatever I enter in ascending order of the variable a .. I want to know what is wrong with this Thank you all in advance.. [CODE]public void addRecord() { Scanner abc=new Scanner(System.in); System.out.println("Enter the file number "); int a=abc.nextInt(); System.out.println("Enter … | |
Heya Thanks for taking the time to look at this, i would like some people to review my curent project which is written in c++ using visual studio 2008. Although in VS08 it does not use anything that makes it dependant on it (i dont think) i just wanted to … | |
It is posible in a linked list implementation,the nod to hold more then one information ? for exemplei want the node to hold a person`s name,adress,country,etc.... | |
Can someone take a look and let me know if this is right... I need to add a method/function to output a linked list in reverse order. I need to use either the header and source files for the dynamic list class. I cannot reset links or alter the original … |
The End.