2,179 Topics

Member Avatar for
Member Avatar for Keyonts

I have a simple plane object with public datamembers of a flight number and a pointer. I am successfully adding "planes" and deleting "planes," however when I try to move one up a spot, though it compiles well, I seem to get memory crashes. Here is my bump function that …

Member Avatar for WolfPack
0
154
Member Avatar for h46

hi I'm trying to create a program in c that reads in words and prints them out backwards, e.g. hello would become olleh. I want to do this using a linked list and getchar to get the characters. I know I need to insert each single character at the start …

Member Avatar for SpS
0
90
Member Avatar for desertstorm

Hello: I have a question regarding struct when making hash buckets eg. typedef struct _hashNode { void *key; void *value; struct _hashNode *next; } hashNode; let's say when I create the table: hashNode *nodeList = (hashNode *)malloc(sizeof(hashNode) * 200); This is because I want a fixed list size and then …

Member Avatar for Ancient Dragon
0
756
Member Avatar for TimC

Are there any good tutorials out there that explain adding objects to a single linked list. All I have come across are linked lists involving "structs". regards T

Member Avatar for SpS
0
165
Member Avatar for Ancient Dragon

This is a simple example of how to use recursion to get a list of all the directories (folders) and file names within them. It also illustrates simple use if std::list, std::vector, std::string, std::cin and std::cout. It was compiled and tested with both VC++ 6.0 and Dev-C++ compilers on XP …

Member Avatar for Dani
0
240
Member Avatar for btech

The assignment I am working on is to create a doubly linked list. This is what I have thus far. However when I compile I get 2 errors: LNK2001 unresolved external symbol and LNK1120 unresolved externals. Was hoping someone could look over my code and help me with these errors. …

Member Avatar for Ancient Dragon
0
162
Member Avatar for kyakobi84

I did a "single linked list" header & Implementation & Main files & everything worked very good. But now i must Implementation for the "doubly linked list" & i just need to know what i should add to my functions so they will work good, should i change all the …

Member Avatar for kyakobi84
0
96
Member Avatar for sahil_m

Hi, I've just started coding a simple linked list library and I would like the final implementation to have functions like sorting & searching. My questions are:- 1.I think that my library would need to implement sorting and searching similar to the qsort() and bsearch() implementation's in borland's library. 2.Could …

0
62
Member Avatar for Puckdropper

I've got a program to do for a class I'm taking. I've got most the code written but I can't get the two classes to play together like I want them to. Here is the relavent part of the assignment: [quote] A concordance is an alphabetical listing of all words …

Member Avatar for Puckdropper
0
701
Member Avatar for Asif_NSU

This is probably a stupid question, but i dont get the answer. Plz help me understand. Question: How could a linked list and a hash table be combined to allow someone to run through the list from item to item while still maintaining the ability to access an individual element …

Member Avatar for Narue
0
181
Member Avatar for Chipsncoke

I am trying to construct a JTree to show the following data. The program should he able to read any data in this format. [B]ChildNode[/B]--------[B]Parent Node[/B] Employee--------Root Visitors----------Root Staff------------Employee Students--------Employee Graduates-------Students Undergrads------Students Interns----------Employee,Visitors I have this two columns of info stored in two linked list. LinkedList A and LinkedList B. …

Member Avatar for Chipsncoke
0
242
Member Avatar for heavyc

I was wondering if anyone can help me with linked lists??? I have to create a linked list with 10 random numbers rangeing from 1-5 and insert them into a node in the appriote postion of a linearly linked list and display the number of times each number of occurences …

Member Avatar for Narue
0
317
Member Avatar for djbsabkcb

What is a two way templatized linked list in C++? Does it mean using syntax below for classes and member functions definitons? [code] template<typename type_variable> [/code]

Member Avatar for djbsabkcb
0
133
Member Avatar for jusCk

What I'm needing to do is set up a Login mechanism for My Website, The Login Page can be found at http://cksPlace.dns2go.com But it's from My last set up using only a FTP server, and AnalogXs' Simple Server. That's when I was running on an ole 98SE box, and it …

Member Avatar for jusCk
0
374
Member Avatar for bsdpowa

Hello all, I'd like, very much, to understand linked-lists.I've read many texts on the subject and tried many source codes but none of them seemed to fit my needs (one from daniweb is pretty close but it's in C) so I, as desperate as I can be, beg you for …

Member Avatar for bsdpowa
0
531
Member Avatar for kharri5

Greetings To all! To whomever, an advanced thank you if you help me. I am a Java programmer initially, but I have begun learning C++ and am doing something with a Double Linked List (Error occurs whether it's double or single, I teste it). Filling the contents of the list …

Member Avatar for Drowzee
0
780
Member Avatar for tundeakins

dear programmer A pharmacy needs to automate drug inventory management system. Every drug has chemical Name, Chemical Composition, date of manufauturing, expiry date, and courtry of origin, quantity, category and others. the pharmacy has a policy to dispose expired drug before use. however, it is not an easy task to …

Member Avatar for Narue
0
162
Member Avatar for hisrichness

Hey, I have to write a Java program that implements a sorted linked list to be able to count the number of chars and words in an input file. would any1 be able to help me please? Thanks

Member Avatar for jwenting
0
122
Member Avatar for yaan

I've gotten feedback from my instructor to modify my code because it contains poor design techniques. I need to add a " return " after each function without it going back to " main " and also to avoid the use of global headers. I've tried to modify it several …

Member Avatar for BruceWilson512
0
181
Member Avatar for harshchandra

I was tring to write some data in a file from the singly linked list and also read the data from that and append it to singly linked list in the begening of the program.For this i had written two seperate functions . 1. writetofile 2. readfromfile for appending the …

Member Avatar for harshchandra
0
150
Member Avatar for amura97

Hello everyone, I recently wrote a very large program in Borland C++ (version 4) that implements a lot of linked lists. For many reasons I am now obliged to migrate to Dev C++, but when I run my software I get a "Access violation (segmentation fault)" error. This happens whenever …

Member Avatar for typek
0
155
Member Avatar for CryingRaven

I have been a Delphi user for 8 years and now migrated to C++ and have found the changeover quite taxing indeed. I am using Visual Studio .NET and have before that used MSVC 3 and MSVC 6 and always had the same problem: I code my classes and methods …

Member Avatar for Dave Sinkula
0
329
Member Avatar for Potsuki

Hi there I wonder if anyone can help out a newbie. I am trying to understand the difference between passing variables by reference or value. This is what I understand so far: 1. Passing parameters by value is when the variable is copied into the parameter list of a function …

Member Avatar for Potsuki
0
127
Member Avatar for UltimateFreq

Hi all, This along with many of the other questions on this forum is from a noob at both the forum and java and was hoping someone could please help me. What im trying to do is read some info from a file and then store it in a linked …

Member Avatar for UltimateFreq
0
185
Member Avatar for JoBe

Good evening everyone, This next exercise, I have to do the following: Write a ClassTemplate for a linked list. Demonstrate it by using two linked lists. The datafield of the first type is int, the second one is double. What Ive got sofar is this: [code] #include <iostream> #include <vector> …

Member Avatar for Dogtree
0
228
Member Avatar for wsn

hello everyone, I'm writing a function traverse for a doubly liked list, I can only use these private members: Node *current , int count, int mutable current_position and one one private member function void set_position(int position) const The post condition of member function traverse is the action specified by function …

Member Avatar for wsn
0
132
Member Avatar for haskari
Member Avatar for compshooter

I have three doubly linked list queues and I need to sort them based on a variable that each object has namely its job length. I am attempting to code for a shortest job first processing program. I already have most of the program complete but now I need to …

Member Avatar for compshooter
0
238
Member Avatar for Fasola

I HAVE SPECIFIC QUESTIONS!!! 1. Why do you need [b]Self-Referential Classes?[/b] Please provide a "real" life example of when it would be used. [code]class Node { public: Node(int); void setData(int); int getData() const; void setNextPtr( const Node *); const Node *getNextPtr() const; private: int data; Node *nextPtr; };[/code] 2. ^^^What …

Member Avatar for Fasola
1
960
Member Avatar for Sluga

Hi, i'm doing a program in OpenGL and need some help with arrays. Basically I have a structure called ObjectNode which is used to implement a linked list with two data members, an int for the object type and an array of IntPoints (IntPoint is just a simple structure to …

Member Avatar for Sluga
0
2K
Member Avatar for mel2005

[B] (1) any flight can be brought to the front of the queue ready for deleting(landing) (2) any flight can be diverted to the back of the queue for another airport if the first airport is busy or on runway closed due to an accident. (3)in the flight ID, there …

Member Avatar for Narue
0
132
Member Avatar for Asif_NSU

I have a template linked list class, eg: [CODE]LinkedList<int> list1; LinkedList<implicant> list_imp;[/CODE] Now I need a Linked List of Linked Lists, This is how I declared [CODE]LinkedList<LinkedList<implicant> > list_of_lists;[/CODE] Then I declared a Linked List of implicant class. [CODE]LinkedList<implicant> implicants_list;[/CODE] I calculated some value and put them in the implicants_list. …

Member Avatar for Narue
0
144
Member Avatar for cghv

Hi, I am writing a program at the moment which requires me to scan in data from an external file, which to be added to a linked list. The external file is a list of pairs of cities and the distances between them - each piece of data is tab-delimited, …

Member Avatar for Dave Sinkula
0
174
Member Avatar for Catweazle

Hi to all our newcomers, and to those not-so-newcomers who may still be struggling with just what a forum is and how it works. We are a community here. Our purpose is to assist you with your problems, if we can, but beyond that we want you to become one …

8
216
Member Avatar for christi

hi-i hope someone can help me.. I am creating a linked list of nodes, I am trying to insert a new node alphabetically by strcmp the name field. I keep crashing at this point... you will see in my code below, I can add to the front of the list …

Member Avatar for 1o0oBhP
0
103
Member Avatar for F50

hi there, I have a linked of structures that I created, but i wanted to implement it using classes. here is a sample of my code that works perfect. The struct, and a function to insert items into the linked list. thanks in advance. [code] struct NodeQ { NodeQ *next; …

0
87
Member Avatar for Jaron

1)UNIX operating system uses [B]Round robin Time slicing with multilevel feed back.[/B] Assume that there are [B]10 processes [/B] waiting in a queue which is implemented as a [B]linked list of PCB’s [/B] ( process control blocks). Assume the PCB have information about [B]Process ID , CPU burst time required …

Member Avatar for Dave Sinkula
0
105
Member Avatar for scar_zone82

hello there ....can someone help me solve my problem of my assignment....i try to code it....so I need some guidances ... This is the question... An operating systems uses shortest job first scheduling for it’s process management. Assume that there are 10 processes waiting in a queue which is implemented …

Member Avatar for vegaseat
0
195
Member Avatar for Jaron

1)UNIX operating system uses Round robin Time slicing with multilevel feed back. Assume that there are 10 processes waiting in a queue which is implemented as a linked list of PCB’s ( process control blocks). Assume the PCB have information about Process ID , CPU burst time required , amount …

Member Avatar for Intel
0
428
Member Avatar for mariners95

Could someone help me with a linked list code. I just cant figure it out. I dont know how to code the part where I need to insert an element in ascending order. Either when there are no nodes then when there is one or a few nodes. Can anyone …

Member Avatar for Tight_Coder_Ex
0
77
Member Avatar for deejay400

Hi, Trying to get my head around constructing an array of pointers (I think this is what its called). Been reading lots of online tutorials etc and just getting confused. Basically what I'm trying to is set an array of chars, with each array cell pointing to a linked list …

Member Avatar for Tight_Coder_Ex
0
107
Member Avatar for jeanatkin

Hi again. I'm here to [I]wreck[/I] your world. Just kidding. How's your new year, all of you? Going on swell? Eid Mubarak to all Muslims. Bypassing the small talk, I'm here to query you on a doubt I have in dynamic initialization. As I have learnt in school (correct me …

Member Avatar for Narue
0
112
Member Avatar for lizp

I have written the following program, but still have a problem understanding the code . why won't this work? [code] /*This program will organize a linked list of employees Written by Elizabeth Preuss January 2005 Adapted from classwork and handouts Version 2.0 language c(target borland) */ #include <stdio.h> #include <string.h> …

Member Avatar for Narue
0
131
Member Avatar for skeet123

I have been working on this program awhile and I am almost done with it except for trying to get the output to look like what instructor wants. Here how the output should look: [PHP]BREAKING DOWN: list = DUMP: (size = 4, first = 4, last = 3) DUMP: head …

Member Avatar for 1o0oBhP
0
91
Member Avatar for dan34633

ok, i need to write a function called merge_lists that take two call-by- reference arguments that are pointer variables that point to the heads of linked lists of values of type int. the two linked lists are assumed to be sorted so that the # at the head is the …

Member Avatar for 1o0oBhP
0
413
Member Avatar for the b

I am writing a program using a linked list and I am almost to the point where I can compile and run it but I keep on getting this error message: error C2447: missing function header (old-style formal list?). What does it mean? I looked through the code but I …

Member Avatar for 1o0oBhP
0
661
Member Avatar for the b

I am writing a program that uses a singly linked list. The program is suposed to ask the user for the number of days they have temperatures for and for the corresponding temperature. I seem to be having a problem with the get_temp function. When I run the program it …

Member Avatar for the b
1
129
Member Avatar for lida1984

Hi i'd be glad if u help me with write this program. i want to write a polynomial program which it has a class that create 2 obj like this with useing linked list: (Ax^2y^3+Bx^4y^8+....)AND(ax^5y^1+....) and after that multiply these 2 obj to each other and put the answer in …

Member Avatar for 1o0oBhP
0
148
Member Avatar for nufanvandal

Hello, I have a project which involves basic implementations of linked lists, in C. First though, I have to read the information from a file, which contains all different types(int, char, float) which is my problem...after i read the information into the nodes, it should be smooth sailing.. I was …

Member Avatar for nufanvandal
0
128
Member Avatar for magnia

can anyone help me this im just trying to read some integers into a linked list from a textfile the file will be something like this, ive done the code but it wont compile Arrival Times Burst times 23 .5454 34 .78 12 .96 Code: import java.util.LinkedList; import java.util.ListIterator; import …

Member Avatar for freesoft_2000
0
100

The End.