2,179 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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. … | |
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, … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.