2,180 Topics
![]() | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
> 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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
what is meant by generic linked list. how to insert and delete the elements in the linked list which is generic | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
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. … | |
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 | |
[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; } } … | |
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 … | |
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 … | |
Hello, Can anyone provide me the optimized and with low complexity program to remove the repeated elements in an single linked list program? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
i just want to know how to write a circular linked list destructor. anybody help? | |
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 ; } … | |
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 … | |
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 … |
The End.