2,180 Topics
![]() | |
Im hoping this is just simple, but I have a main class for my GUI and I do some printing in another class called board, which gets its information from my peg class, which gets its information from my linked list. Is there and easy way to print my pegs … | |
i am trying to implement a database of books and i am have to use linked lists and possibly dynamic arrays for the first time so i am a bit confused..i just wanted to know if this is how i should b going about my constructors and if theres anything … | |
Hello all, I have been a member here for some time, i must admit this is my first post. I have read the posting rules, lets hope my title is considered "meaningful". i have no code snippet, yet. I have just hit a sudden wall in my heap programming. I … | |
Hi to all, I have this homework with Pascal. We have a text file that has some text in it (thetext.txt). we want to put all the words of the text and the frequency in another file without repeating the word(file name finalfile.txt). Example: thetext.txt has this text in it: … ![]() | |
am trying to figure out how to insert a new number in a linked list after a specified number...i am failing to figure out how to fix in the number in the list...here is the partial code..any help is appreciated [code=cpp] void insert(detailsPtr& head) { detailsPtr prev, current,tmp; int num,curr_num; … | |
Hi guys, I was wondering if I could get some help on the topic of recurrsion. A week ago i was told to create a application using nodes. this week I need to convert the reverse_list fuction I made below into using recursion. any help would be great thanks. not … | |
hey guys. i have a linked list set out like this [CODE] struct node { string bookTitle; string *authors; int nAuthors; node *next; }; node *start_ptr; [/CODE] and i need to sort the linked list based on bookTitle alphabetically. how would i go about doing this? | |
BACKGROUND Your company is writing software for a new networking device and you have the task of managing the DNS storage and retrieval. DNS must translate between an Internet IP address such as 74.125.19.99 and the URI (in this case [url]www.google.com)[/url]. The networking device is not available so the code … | |
I have a small problem with adding some items to my linked list....the code compiles with no errors but when run it doesnt complete...it looks like it is still waiting for some input but i dont know where my loops are going wrong.. [CODE] #include <iostream> using namespace std; struct … | |
This is my program of stacks. The problem is this that it does not show output. whenever I run the program, the output screen flashes and nothing else happens. (using Dev-C++) Don't know what's the problem with it. [CODE] //****************************STACKS******************************** //===============Stacks using linked list(Arrays)================= #include<iostream> using namespace std; int avail=-1, … | |
What i am trying to to is the following when user inputs ./test U [url]www.google.com[/url] I <ip here> same for ./test U <URL here> I <IP here> using command line input argv and argc here is what i have done so far, [code=cplusplus] #include <iostream> #include <cstdlib> #include <string> using … | |
as we know that memory is very important in embedded systems which one is more effective either to use single linked list or Double linked list..even though DLL is more convenient it will consume more memory.. | |
Can anyone please help me to find the sum in the linked list. I have written codes to insert and remove numbers from lists but I have no idea how to calculate the sum. [CODE]void List::insert( const double &value ) { ListNode *newPtr = getNewNode( value ); if ( isEmpty() … | |
Hi guys, I'm both new here, and new to c++ so be gentle! Over the past short time we've been looking at c++ on our course, but I don't believe it has been taught too well, and I'm struggling to understand what should really be basic concepts? An assignment we've … | |
I am having trouble implementing a sort function for this link list. This list works just fine. I just want to be able to sort by name. When I run the sort function I get back this; -------IN------- bb aaa aaaa aaaaa aa bbb b -------OUT------- bb bbb -------------- I … | |
Hey guys and girls. I am working on a project that needs to use templates. My professor didnt go over teh use of them in class, nor is our book very descriptive of them. Im assuming they are way easier than i make them seem, but some help , tips, … | |
[code= cplusplus] struct wheel_node { int contents; wheel_node* next; }; typedef wheel_node* wheel_ptr; class wheel { private: wheel_ptr arrow; public: wheel (); void print (); void spin (int distance); void move_to (int number); }; [/code] The constructor wheel creates a circular linked list as follows: arrow -> 5 -> 40 … | |
Hi! guys! I have a question about generic linked list. This is an example using C. [code] typedef struct list{ void *info; struct list *next; } List; [/code] but now I have to translate it to C++, but I must use template instead of void*. [code] template <class T> class … | |
I am having trouble with how to print from the doubly linked class i created. I could really use some help here is my code [ICODE]import java.io.*; public class SongList { private static Node head,tail; public SongList() { head = new Node(); tail = new Node(); head.setNext(tail); head.setPrev(null); tail.setNext(null); tail.setPrev(head); … | |
I am writing a doubly linked list, but i am having problems inserting. Here is my code for the node, and main. The issue is in the main when i call insert, it gives me null. How can i get the node to point to head, and tail(insert it). Help … | |
[code=cplusplus] struct wheel_node { int contents; wheel_node* next; }; typedef wheel_node* wheel_ptr; class wheel { private: wheel_ptr arrow; public: wheel (); void print (); void spin (int distance); void move_to (int number); }; [/code] The constructor wheel creates a circular linked list as follows: arrow -> 5 -> 40 -> … | |
I have this program that suppost to ask user to select option: [option] a. Start a new list b. Add a Node to the end of the list. c. Add a Node to the beginning of the list. d. Add a Node at a specified position in the list. e. … | |
Hey guys, I am having trouble getting data from a file into a linked list. I'm very new to c++ and am finding it difficult to understand but am trying my best. I need to get a text file and insert each character into a seperate node in a linked … | |
So I'm writing a program in C that reads in a bunch of words from an unspecified number of files and I'm to print out the top N words in the file. I'm using a hash to store them in, where each bucket is a linked list. The lists are … | |
Hi, I've question regarding visiting and printing nodes for tree traversal. the main purpose of my program is to create tree for an arithmetic expression and then perform in-order and post-order traversal on the tree. The structure tree need to be hard-coded in the program using linked-list/pointer stored in one … | |
implementing dijkstra algorithm using fibonacci heap and linked list........... can anybody help me with the coding for this problem.................. i hav implemented using array now i hav to implement it using fibonacci heap and linked list............. | |
Hi there, I'm having a problem with adding a data structure to an existing linked list that has highlighted a gap in my knowledge about the latter. Briefly, what I am trying to is add a 'particle' to the end (i.e. appending) of an existing linked list of particles. My … | |
I have an assignment to do a linked list in mips, but i cant find a good starting point, can someone offer some insignt, and also wouldi t ever be useful to use a linked list in mips? | |
hi there i was wondering if any1 could help me with this problem. i am a beginner at c++ and my coursework is asking me to create a program with a hash function and i am lost! could any1 tell me how to implement this? here is my problem - … | |
i came into Assertion failure during running this program, and i really don't know why, hope you guys can help, thanks a lot ^^ The program is to copy a linked list from another, the Copy function may look complicated because i'm not experienced enough to simplify it.. Without the … | |
i don't know if i should post it here or in C++ , but please help me, i came into Assertion failure during running this program, and i really don't know why, hope you guys can help, thanks a lot ^:)^ The program is to copy a linked list from … | |
I have to perform an insertion sort in a linked list. Having problems. any help? | |
Hi .... i'm getting the following error " 'buildListForward undeclared' when trying to compile this program. Please help ! [code=cplusplus] //Linked lists //Pg.288 #include <iostream> using namespace std; nodeType* buildListForward(); int main() { buildListForward(); nodeType* buildListForward() { nodeType *first, *newnode, *last; int num; cout << "Enter a list of integers … | |
Hi all, So i'm creating a program that will read a file into a linked list. And the user will be able to add, remove and display the list. Im suppose to create a search function in order to find the link to remove or add or display. Here is … | |
Hi, guys I don’t know if anyone can help or not? I've made a form for a search list using an SQL query which is linked to my form. Basically the user selects a class of a car and the price is shown and then the user inputs what dates … | |
Hi guys, This is my very first thread. Now I would like to know about file handling. I have got this book, but the concept is still not that clear to me. So, can you guys suggest any online material that would help me in this regard. Also, could you … | |
Hello, I'm sorry if this has been asked before, but I didn't seem to find any answers. I'm trying to write a function that would delete a specified number from a singly linked list. This is what i've got so far, but it's not working: [code=c++] void remove(list*& start, int … | |
I have a major problem. I need to write a program using linked lists that will display... A B C D E F and then... F E D C B A without using a tail pointer. When I run the program, it displays the first set of letters but crashes … | |
Hi, I want to use linked list in the linked list. In the following code i would like to introduce new public member as species which has four to five members. How to modify the code to add new member species? In the class TREE, I would like to add … | |
i am trying to create a program that shows details of 40 different hills. he dteails must include hieght and distance from home. i am trying to show tge details in order of height from smallest to highest but i cant get them in order here is all of my … | |
code to display linked list: [CODE]for (Node *cur = head; cur != NULL; cur = cur->next) cout << cur->item << endl;[/CODE] in the header file: [CODE] struct Node { int item; Node *next; }; [/CODE] It will declare a new pointer called cur, set it equal to head, and keep … | |
Hello everyone, I am making a program which acts like a library system. There are two classes: Book and List. The List class contains all the linked list information; [CODE] struct ListNode { ListItemType item; ListNode *Next; };[/CODE] Now, my problem is in the Book class file (Book.cc). I have … | |
I am creating a program to manipulate structures that are similar to linked lists. The problem i am having is in a text file that i am reading in there are delete lines like this. d 1 2 d 2 3 d 3 4 d 2 0 with the first … | |
Hi, I am a newbie for MSSQL. Previously, I was given a question regarding MSSQL. Although the interview had over, but I am curious to find out on how to solve the question below: There are 2 tables, NAMES (ID INT IDENTITY(1,1), NAME SYSNAME) and RELATIONSHIPS (NAMEID INT, PARENT_NAMEID INT) … | |
Ok i am writing a program to manipulate structures that are similar to linked list. I have a file that has these contents. 4 5 0 0 0 0 1 0.1 0 2 0.2 0 3 0.3 0 4 0.4 1 0 1 1 1 1.1 1 2 1.2 1 … | |
My question has to deal with the end part of my pseudo code. Basically the method I'm doing is taking the front name in the queue and moving it to the rear and making the next in line to be the new front in the queue, he recomended using E … | |
I'm trying to write some code that will read numbers from one file and put those numbers into a list and then print the list in another file. I'm having trouble trying to get the numbers from the infile to read correctly. The program compiles ok but when the list … | |
Hi there, I'm becoming increasingly confused trying to implement an array of pointers, that themselves point to nodes in a linked list. Basically my problem is that I need to sort through an existing linked list per element, over all other elements (which works fine) based on a particular criterion, … | |
Hi I have to create an iterative insert for an avl tree and I have to use enumeration for my balance factors. My enumeration is enum balanceFactor {TILTS_LEFT, BALANCE, TILTS_RIGHT} Please help me. I have been struggling with this for almost 2 weeks. When I enter input such as 20 … | |
I followed the book to finish this 2 node linked list, and however it looks like there is only one node in it. (temp has replaced the head???? my book example coded this way which i don't fully understand) Is anything wrong in here? And i think my output function … |
The End.