2,180 Topics

Member Avatar for
Member Avatar for mattieu

I am having with some problems with a project I am working on. I need to output simple statistics of the "ps -ef" using the line "ps -ef | a.out", a.out being my program. To store the information I need to use a Hashtable of Linked Lists, without using STL. …

Member Avatar for mattieu
0
148
Member Avatar for kako13

Hi, I have to implement a class called linked list that must read from file the following information about persons: name, social security and age. Then I have to implement some methods for manipulate the data. The problem is that I don't know how to start the implementation, because I …

Member Avatar for kako13
0
118
Member Avatar for Syntax Error

hi there.....i wonder what's the difference with these 2 linked list... [code] 1. struct node { int wage; int hours_worked; int salary; int hoursW; char* name; struct node *link; }; [/code] [code] 2. struct listNode { char data; struct listNode *nextPtr; }; typedef struct listNode ListNode; /* synonym for struct …

Member Avatar for Ancient Dragon
0
203
Member Avatar for samer.daur

i want some tutorials in File structurte and Data structure... can anybody help me?!! i'll tell u my case briefly am asked to do an assignment in ma college depending on the 2 courses (File organization & Data structure) i need to buikl a class that implements linked list and …

Member Avatar for Ancient Dragon
0
134
Member Avatar for USUAggie

Hello all, I am having some trouble creating and using a template based linked list and I hope you all can help me out. I have created a LinkedList class, and I am trying to use it in my main, but I get a unresolved external link error, that I …

Member Avatar for bugmenot
0
83
Member Avatar for asadalim1

Greetings all, I have multiple list options linked, like Country, city, town, when e.g france is selected it gives all the cities in france in the following option list. and when say paris is selected it gives you all the towns in paris and third category. I have found an …

Member Avatar for asadalim1
0
93
Member Avatar for jobob64

The compiler gives me a error C2955: 'Node' : use of class template requires template argument list. Some one wanna look it over and gimme some tips? [code] //list.h #ifndef LIST_H #define LIST_H #include "node.h" #include <iostream> template <typename T> class List { private: Node * m_head_node; Node * m_current_node; …

Member Avatar for jobob64
0
111
Member Avatar for SEOT

I need to sort a list with a bunch of numbers in separate columns. How would you sort a linked list with a bunch of numbers in separate columns. Anyone have any good examples to share or point me in the right direction. Please help - SEOT

Member Avatar for dougy83
0
129
Member Avatar for EvEyUm21

i dont know how to display the contents in my program.pls help me with this...i use 2 linked list here...1 for the bills and one for the names....i cant display the names of the employees.......if i dont pass this on friday,i will fail =(........pls check my code and encode ur …

Member Avatar for Ancient Dragon
0
70
Member Avatar for sunrise2007

hello I have an error with template class and I can not understand what is the problem? the code illustrate the arrangement of many of books by its publishers' names and if the books have same publisher arrange them by the title of the book . [COLOR="Red"]the error is instantiated …

Member Avatar for zhelih
0
143
Member Avatar for Noliving

I'm not seeing my bracket problem at all! [code=java]import java.util.*; /** A class to represent an ordered list. The data is stored in a linked * list data field. * @author Koffman & Wolfgang */ public class OrderedList<E extends Comparable<E>> implements Iterable<E> { /** A linked list to contain the …

Member Avatar for Noliving
0
251
Member Avatar for Noliving

Ok this is my first time doing iterators in java so bear with. Here is what my assignment is asking for: You should add the following methods to the code provided by the authors: public ListIterator <E> iterator() The type of iterator is actually ListIterator because this can be easily …

Member Avatar for Noliving
0
84
Member Avatar for Joatmon

I created a snake game using objects of snake segments that act together in a linked list type way (I think.) and I notice that when you select quit after you die with more than 2 links, the program throws some run time error. Even funkier, when I used a …

Member Avatar for Joatmon
0
118
Member Avatar for Samadhi69

I'm familiar with java and have made many data structures there. Not so much in C and to complicate it the professor wants the LL set up LISP style. I know I need to iteratively sort the tail then insert, but the setup we were given lacks some of the …

Member Avatar for WaltP
0
108
Member Avatar for larry12720

keep on getting this error after I put my input file, the program compiles but when I try to use it it gave me Core segmentation error. I guess there is something wrong with the memory. plz help Goal: My program should take input string from a file and do …

0
55
Member Avatar for KimJack

Hello All, I am having a problem with removing a specific item from a linked list. Any advice would be great: Here are some snippets: private Node head; //the head node at the front of the list private Node previous; //element just before the current position private Node current; //refers …

Member Avatar for sohguanh
0
920
Member Avatar for jessel

hello sir i'm a new user,i just want to ask if you have sample programs which deals on linked list....if possible not the add.edit,delete program

Member Avatar for zhelih
0
89
Member Avatar for Danii

> define a method addOn that it adds the data argument to the list in the sorted location in alphabetical. There can only be one of each company in this list. public void addOn(company data) { Node it = new Node(data, head); head = it; it.data.toString(); } this is a …

0
69
Member Avatar for Olsi009

Hi again, this is a simple programme that I can't make work :S in turbo pascal. [COLOR="Green"]Write a program to create a new list and then display it through a Recursive Procedure ( and use 'p' as a local variable).[/COLOR] This is what I could do but considering I hate …

Member Avatar for brijkiran
0
206
Member Avatar for plgriffith

I have a linked list of structs, with each struct having a char* and an int. When I try to print the list I get a seg fault. If I just print the int however it works. What am I doing wrong so the char* won't print? printf("%s %d\n", p->name, …

Member Avatar for plgriffith
0
2K
Member Avatar for RexxX

Say I have [code] #include<iostream.h> int tempNum; struct node { int data; struct node *next; }; struct node *newNode = NULL; int main(void) { tempNum = 5; newNode->data = tempNum; //gives seg fault } [/code] *edit - I'm trying to add tempNum to the very first node. I haven't worked …

Member Avatar for Aia
0
104
Member Avatar for prs55

I have a problem on getting the nth list item( function: DataType get(int n) const ),though it may seem easy. here is my code.. [code=cplusplus] #ifndef ORDERED_LIST #define ORDERED_LIST #include <fstream> using namespace std; template <class DataType> class OrderedList { public: OrderedList(); ~OrderedList(); void clear(); DataType get(int n) const; void …

Member Avatar for prs55
0
105
Member Avatar for swetha bandaru

what is meant by generic linked list. how to insert and delete the elements in the linked list which is generic

Member Avatar for Narue
0
426
Member Avatar for armanp

I have a function find(x) in my linked list, that search through the listfor the value and return an Iterator pointing to the first node contaning value x. if x is not found in the list, it returns an Iterator pointing to NULL. it should be a linear search. would …

Member Avatar for Lerner
0
105
Member Avatar for vtskillz

Hi I was wondering if someone could help with linked list. I'm trying to read i a text file in this format: ID Name PR Salary 339 GOERGE 4 26000 221 SANDY 4 22600 101 RONNY 3 35250 and put it in a linked list. I have this much so …

Member Avatar for VernonDozier
0
1K
Member Avatar for stk123

Hello, if I compile this code it crashes at the if statement comparison. Giving me an access violation. it is meant to check, wether the elements stored in the linked list are ascending. I would really appretiate help. Thanks stk123 #include <fstream.h> typedef char Item; class Node { public: Item …

Member Avatar for Duoas
0
150
Member Avatar for olams

Hi, i am writing a program to manipulate polynomials. however, i am having problems with my root function. this function is meant to find the real roots of a polynomial using newton-raphson formula. please help me. [code] #include<iostream> #include <sstream> using namespace std; //A class to handle a list node …

Member Avatar for iamthwee
0
121
Member Avatar for olams

Hi, please help me with this program that i am writing. i am writing a program to create a polynomial. i set the values, but whenever, i debug it, i get this: 4x^2 + 0X^1 + 0x^0 + which do not correspond to the values that i set it to. …

Member Avatar for WolfPack
0
195
Member Avatar for KimJack

Hello All, I have absolutely no experience with linked lists. I have an array of Animals that I am trying to reference from a linked list located in another class. Can anyone point me in the right direction for starting this program? Any assistance would be appreciated. Thanks

Member Avatar for ~s.o.s~
0
99
Member Avatar for gReen_aXe

[CODE]#include <iostream> using namespace std; typedef struct List { int data; List*link; List(){ data=0; link=NULL;} }SList; SList*L,*P,*temp; int x; SList*createnew(int x){ temp=new List; temp->data = x; temp->link = NULL; return (temp); } SList*findLast(SList*L){ temp=L; while(temp->link != NULL) temp=temp->link; return (temp); } void printList(SList*L){ temp=L; while(temp!= NULL){ cout<<temp->data<<endl; temp=temp->link; } } …

Member Avatar for Narue
0
151
Member Avatar for kitin

this is a part of my graduation project on Minority Game, I have problem with changing MemValues after first it iteration, at the first iteration I need random values, but after that i will have 1 Last win wihch would be the temp[m_nMemory-1] and then eache value should be shift …

0
66
Member Avatar for teppuus

Hello, I am having some trouble traversing backwards through a double linked list. Basically this program pulls words from a text file (I have attached the file I am using), corrects the words and stores them in an array of pointers (one pointer per letter of alphabet) of double linked …

Member Avatar for teppuus
0
178
Member Avatar for prakash.kudreka

Hello, Can anyone provide me the optimized and with low complexity program to remove the repeated elements in an single linked list program?

Member Avatar for Salem
0
91
Member Avatar for ankita_ribose

Q:The genome of an organism is inscribed in DNA, or in some viruses RNA. The portion of the genome that codes for a protein or an RNA is referred to as a gene. Those genes that code for proteins are composed of tri-nucleotide units called codons, each coding for a …

0
60
Member Avatar for rash89

hi guyz.i've been working for this assignment in linked list for almost a week now..im complete making the program but i still have problem in deleting elements..in my program when i enter 1,2,3,4 and i want to delete 2..it deletes the 4 not the 2:?: ..how will i solve this?..pls …

Member Avatar for Passmark
0
94
Member Avatar for olams

Hello, Please i really need your help. I am trying writing a code that will delete the last element of the list. However, i keep getting 0 or when i tweak it, i get a message asking me to abort what i am doing. In this code, i append some …

Member Avatar for olams
0
148
Member Avatar for Olsi009

Hey guys, I study computer science (1st year) and I have an exam after tomorrow but there's one exercise with the linked lists that is impossible for me. [COLOR="Green"][B]Supposing that we have 2 created linked lists, let's create a third one that has the elements of the previous 2, but …

Member Avatar for Duoas
0
2K
Member Avatar for teppuus

Hello, I am having trouble creating a double linked list within an array of pointers. Right now actually, I am just trying to make a linked list. Line 267 is where I get a complier error. I understand the error (cannot convert `std::string' to `wordList*' in assignment ), but I …

Member Avatar for teppuus
0
138
Member Avatar for C++masterinneed

[code=c++] void winerys::info(winerys & wine) { ofstream outfile("page.txt"); node *temp; temp = new node; cout << "please enter date the winery went into business" << endl; cin >> temp->start; cout << "please enter the loaction of winery" << endl; cin >> temp->name; cout << "plese enter the name of winery …

Member Avatar for Ancient Dragon
0
102
Member Avatar for phalaris_trip

I've searched for linked lists quite a lot (and read some books), but I've yet to find one that suits my needs. I wanted one that is: templated, provides only the bare bones of what's needed and easy to read and understand the code (simple, consistent variable names, meaningful and …

1
63
Member Avatar for renaad

HI everybody: I'm renaad & i'm 21 &student of computer science . i've a problem & I despairet 4 a help: l keep having this message "fault access violation at(##) write of address" when I compile my program & i don't know why this is the code: (it's a linked …

Member Avatar for renaad
0
262
Member Avatar for SHWOO

I am trying to create a set of functions to allow the user to output a string to a file name EngineLog.txt It compiles fine, but I get an Unhandled exception at 0x00444c36 in Test.exe: 0xC0000005: Access violation writing location 0x0000000d. This occurs in the EnableLogging() function. [CODE]//----------------------------------------------------------------------------- // The …

Member Avatar for SHWOO
0
199
Member Avatar for The Midnighter

Alright, so I've got a linked list program going here, and I've succesfully loaded a text file, and I fed each line from the text file into my linked list nodes. Now I want to create a few commands that's going to allow me to alter this text file, while …

Member Avatar for The Midnighter
0
142
Member Avatar for llrdonv

Hello! I'm new to the DaniWeb, so I'm not sure what I'm allowed to ask, and I don't have enough time to search for all rules right now. I have to write a program for tomorrow, otherwise I won't be able to pass the year. It's a bit difficult to …

Member Avatar for llrdonv
0
537
Member Avatar for teppuus

Hello, I have to create a double linked list array of pointers for the alphabet (one pointer per letter). Ok, so I tried starting by creating a double linked list: [code] struct word{ string newWord; word *next; word *back; }; struct wordList{ word *head; }; [/code] And then array of …

Member Avatar for teppuus
0
124
Member Avatar for rnr8

Hi, I need to create and implement a doubly linked list using PHP. Does anyone know of a good tutorial or resource for getting started? I understand the basic premise of a linked list, but really need some specific pointers on how to do so in PHP. ANY help would …

Member Avatar for rnr8
0
98
Member Avatar for omeralper
Member Avatar for twomers
0
150
Member Avatar for emilio

hello i want to build a function which receives a pointer to a head of linked list reverses the order of the list and returns a pointer to the new head. my list is defined like this : [CODE]typedef struct item { int key ; struct item *next ; } …

Member Avatar for emilio
0
107
Member Avatar for n.aggel

I wish a happy 2008 to everyone on this forum. I just obtained the practise of programming{by the way it seems like a great book...} and i have the following code for linked list: [CODE=c] #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Nameval { char *name; int value; struct …

Member Avatar for n.aggel
0
80
Member Avatar for phalaris_trip

Just trying to get my head around linked lists and I'm trying to all the standard container functions.. For a singly-linked list are these algorithms correct? [code=cplusplus] void pop_front(const T& t) { // Deallocate memory pointed to by head node<T>* tempNode = head; delete head; // Get new head head …

Member Avatar for Ancient Dragon
0
83

The End.