2,179 Topics

Member Avatar for
Member Avatar for hg_fs2002

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 …

Member Avatar for hg_fs2002
0
99
Member Avatar for BobbieJean

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 …

Member Avatar for jonsca
0
193
Member Avatar for ssuss

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 …

Member Avatar for steventaal
-3
179
Member Avatar for group256

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 …

Member Avatar for group256
0
188
Member Avatar for stevebush

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 …

Member Avatar for AuburnMathTutor
0
111
Member Avatar for Ryan.

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 …

Member Avatar for Ryan.
0
1K
Member Avatar for tucanoj

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 …

Member Avatar for tucanoj
0
127
Member Avatar for praveenshades
Member Avatar for Codname47

[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; …

Member Avatar for dusktreader
1
107
Member Avatar for Buffalo101

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 …

Member Avatar for LevyDee
0
102
Member Avatar for johnnyturbo3

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 …

Member Avatar for johnnyturbo3
0
703
Member Avatar for pinsickle

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 …

Member Avatar for pinsickle
0
126
Member Avatar for bbman

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 …

Member Avatar for vdeych
0
180
Member Avatar for Dimitar

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 …

Member Avatar for Dimitar
0
435
Member Avatar for kaydee123

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> …

Member Avatar for jonsca
-1
127
Member Avatar for hotness

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 …

Member Avatar for hotness
-1
343
Member Avatar for sankaran1984

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 …

Member Avatar for WolfPack
0
176
Member Avatar for kaydee123
Member Avatar for vbx_wx

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 …

Member Avatar for dusktreader
0
3K
Member Avatar for zaphytaffy

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 …

Member Avatar for zaphytaffy
0
280
Member Avatar for fenerista

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 …

Member Avatar for fenerista
0
130
Member Avatar for melicaster

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 …

Member Avatar for NormR1
0
392
Member Avatar for zebra59

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 = …

Member Avatar for dohpaz42
0
111
Member Avatar for michellemullen

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 …

Member Avatar for ravi.d
0
327
Member Avatar for riyasahamed

please any one give me simple code snippet to perform insert , delete, update, search & display operation using linked list. please help me

Member Avatar for lionaneesh
-1
128
Member Avatar for LevyDee

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 …

0
44
Member Avatar for greatunknown

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 …

Member Avatar for blackhole
0
92
Member Avatar for harshchandra

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 …

Member Avatar for ylnsagar
0
349
Member Avatar for abhi74k

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 …

Member Avatar for rahul8590
0
77
Member Avatar for blue6dImension

[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 …

Member Avatar for bbman
0
183
Member Avatar for eslmz

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> …

Member Avatar for UncleLeroy
0
131
Member Avatar for romyboy2k9

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 …

Member Avatar for thelamb
0
126
Member Avatar for achieve_goals

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 …

Member Avatar for daviddoria
0
72
Member Avatar for circusfreak

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 …

Member Avatar for NormR1
0
139
Member Avatar for achieve_goals

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 …

Member Avatar for ctaylo21
0
129
Member Avatar for tennis
Member Avatar for Geodude0487

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 …

Member Avatar for bbman
0
165
Member Avatar for achieve_goals

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] …

Member Avatar for achieve_goals
0
113
Member Avatar for sdinu96

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

Member Avatar for abhimanipal
0
5K
Member Avatar for gtateco

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 …

Member Avatar for mrnutty
0
3K
Member Avatar for littlestewie

[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; …

Member Avatar for abhimanipal
0
104
Member Avatar for Crysomere

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 …

Member Avatar for Crysomere
0
93
Member Avatar for LevyDee

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?

Member Avatar for Radical Edward
0
76
Member Avatar for Fr33t

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) …

Member Avatar for Banfa
0
223
Member Avatar for yongj

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 …

Member Avatar for Agni
0
97
Member Avatar for itee

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.

Member Avatar for dnanetwork
0
51
Member Avatar for Memo..~

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 …

Member Avatar for s_sridhar
0
111
Member Avatar for Kanoisa

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 …

Member Avatar for Kanoisa
0
170
Member Avatar for vbx_wx

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....

Member Avatar for Narue
0
148
Member Avatar for jimJohnson

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 …

Member Avatar for NathanOliver
0
74

The End.