2,180 Topics
![]() | |
I need to modify this class to mark nodes as deleted without actually deleting them. Of course, other changes will need to be made to the class to facilitate this. I'm really confused where to start. Should I add another Node variable in the inner node class to denote a … | |
Hi I am trying to implement a sequence using a linked list. I need to have the following functionalities: insert, remove and concatenate. The concatenate should not be destructive and the function call should be like. That is Seq1 and Seq2 should be preserved post function call. [code=c++] Seq3 = … | |
Hi All, I am getting segmentation fault when I am allocating memory for the node second time. [code] struct host_msgs_list { [B]struct host_msgs_struct *message;[/B] struct host_msgs_list *next; }; struct host_msgs_list *root, *temp, *temp1; root = NULL; temp=root; For the first message (i.e. OHAD), it’s able to allocate the memory. We … | |
I'm trying to compare strings in a Linked List and it throws a null pointer exception somewhere in the method smallest() which is where i have the strings(nodes) comparing each other. I've been Trying to find the answer for two days now and I've gotten nowhere. PLEASE HELP! The code … | |
Hi.. I am curretly developing on a site which has two dropdown lists which are linked to two database tables; one of which is 'station' and the other 'type'. I have a third table called 'stores' which includes all the information, and has Type_ID and Station_ID as foreign keys. Could … | |
I have been asked to create a student database using linked list. this is the question given to me. Write a C/C++ program to perform the task of maintaining student information for 123 College. You are to use a linked-list for storing the students’ information. Each node of the linked-list … | |
Hello everyone, I'm trying to compare Strings in a Linked List that were input by user and return the smalles(lexicographically) to the console. Any help is appreciated. ** actual method [CODE]public String smallest() // Returns smallest String in StringLog in terms of lexicographic ordering. //Precondition: StringLog is not empty. { … | |
[b]Split from - [url]http://www.daniweb.com/forums/thread255859.html[/url][/b] I think I may be in the same class as rwill357 and I am having some problems getting my code correct too. I appreciate the help that you have given so far. I have made the changes that you suggested. I'm not sure where I'm going … | |
Basically I'm trying to adapt the quicksort algo for array based lists for linked list as shown on a text book. This is only for learning the principles than practically effective sorting. I have struggled to get this code to work, but stil seems to break on a few test … | |
My assignment was to write code to Delete an ith node on a linked list. Will this function accomplish that? [CODE]void deleteIthNode(int el){ IntSLLNode *tmp; tmp = (IntSLLNode*)malloc(sizeof(IntSLLNode)); tmp = head; IntSLLNode *oldTmp; oldTmp = (IntSLLNode*)malloc(sizeof(IntSLLNode)); oldTmp = tmp; for( int i = 1 ; i < i-1 ; i++ … | |
Hello everyone I have been working on generic C data structure (Doubly Linked List) and I have a question: ------ List.c ----- [code] struct node { void *data; struct node *next; struct node *prev; }; struct list { unsigned int length; struct node *head; struct node *tail; }; typedef struct … | |
Ok... so i am making a rather simple calculator, that solves for either derivatives or a polynomial. Though I have to make my own linkedlist is the challenge. Ok, I will just copy and paste the LinkedList.cpp file: [code]#include <stdlib.h> #include <cstdlib> #include <string> #include <cstdlib> #include <iostream> #include <algorithm> … | |
Hi everyone, For practice I am trying to code a simplified version of the template "std::list" but have come accross the LNK1120 + LNK2001 errors. After looking in Visual Studio's documentation and some investigation, it seems the two most common causes are: 1) invalid calls in the code to things … | |
Hi... Have a slight problem with a database I am making... I think I am missing something really obvious! I am creating a database, which will generate invoices for money owed by clubs in a sports league. I want to be able to generate monthly invoices, for each club, which … | |
please i want the code of directed graph fast path and how i can creat graph to linked list | |
Hi guys, I am wondering how can I create a sorted linked list, without using Collection.sort(). Is there a way I can add element in a list in a sorted fashion? | |
Hi, I'm having a syntax issue with timeit while trying to measure the time taken by a function meant to concatenate two linked lists. [CODE] def get_time() : import cell import timeit for i in range( 1, 16 ): lista = cell.make_list(i) #this function return the root of a sll … | |
Hi. I have a working program that lets you put info about a coupon. and then later on you can search for coupons, display them or remove them from the linked list. My problem is that, we are not supposed to perform input operations from our classes. But the way … | |
Hi. I am kind of having trouble with some functions. Basically, I know how to write out functions using void and no return, but for this problem I am working on, I have to use int myfunction(something&) instead of void myfunction(). Can anyone please lead me in the right direction … | |
Hi. I am trying to input values from a user and put them in a linked list. Some how when I display the values that the user inputs, they are both show up under one variable. ie. user inputs $3 and then inputs $5 for next variable. however, when i … | |
[CODE]//word frequency counter #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> struct words { char word[255]; int count; struct words *next; } *pointer, *start, *previous; int statistics(); int main(void) { statistics(); system("pause"); return 0; } int statistics() { FILE *fp; int pom,a; char quest[255]; start=NULL; fp=fopen(name, "r"); fscanf(fp, "%s", &quest); … | |
hi everyone, i am very new in java. i am having problem in SWITCH CASE STATEMENT. can anyone please help me to solve the following problem: you have to write a program in java to generate the following menu with submenus: about linked List 1: ADD ELEMENT 1-1: add first … | |
Hi, In one app I am porting code from jave to c++.The program compile fine but crashes when it enters into the ported code section.I use STL linked list implementation from here: [URL="http://www.syncdata.it/stlce/stl_wce.zip"]http://www.syncdata.it/stlce/stl_wce.zip[/URL] Java code: [CODE] LinkedList toProcessx; LinkedList toProcessy; void phaseUnwrap() { int startX = inputWidth / 2; int … | |
In this assignment a scheduler algorithm needs to be designed and implemented. The scheduler designed will be used for scheduling different tasks/process to be executed in a system. There are different kinds of processes in a system. When the process enters the system it will be directly stored in the … | |
Hi, At the moment my program holds a list video titles in a doubly linked list. When the user wants to save the list to file it is converted to an array then saved onto file. But the problem starts when i want to delete from the list. Say for … | |
I just learned about linked lists, so i decided to experiment a little. I'm trying to make a linked list that automatically keeps all of the data in consecutive order (like bubble sort built in :P). Anyways, the problem is that while it adds data, the second thing added disappears, … | |
Hi, I am implementing the linked list delete as: before delete: (delete a) ->(0x01:a)->(0x02:b)->(0x03:c)-> after delete: ->(0x01:b)->(0x03:c)-> ie instead of deleting a the content of next node is copied to current node and the next node is deleted. The code is as follows: [CODE]template<class type>void list_delete(struct _linked_list<type>** llist, type value) … | |
i wanted to know the procedure to find out a cycle inside a single linked list...if the last node of the list points to an of the nodes(say, the middle node) in the list, then there exists a loop in the linked list...i wanted to know the procedure to find … | |
[code] #include <iostream> #include <fstream> #include <cstdlib> // to clear the screen #include <cmath> #include <string> using namespace std; #ifndef NULL #define NULL 0 #endif int MAX_FLOOR=10; struct passenger { int id,waitingtime,timestamp; float source,destination; passenger * next; }; struct node /*this is the linked list that contains source and destination … | |
Hi there. I need to write a recursive DFS function for graph which is implemented as follows: [CODE=c] struct nodes_arr { unsigned int position[50000]; unsigned int amount[50000]; node *next[50000]; } nodes_table[] = {0};[/CODE] [CODE=c]struct node { unsigned int position; unsigned int amount; node *next; };[/CODE] as a result i have … | |
There's something wrong with my push function, or how I'm initializing the linked list. Can anyone tell why? The pointer 'operands' wont point to the new head, and always points to the first node created. Adding a second node appears to partially work, (second node->next points to the first node, … | |
someone please help me out on this linked list code. it seems not to work out. it is sort of a doubly linked list. look it out. [CODE] #include<stdio.h> #include<stdlib.h> int count = 0; struct node_ptr{ int value; int no; struct node* back; struct node* next; }; struct node_ptr* root; … | |
Hello, I am trying to build a combo menu that contains 5 drop down lists and when sombody selects an item from the first drop down menu, new options appear in the second one. People choose an option there, and more options appear in the third one, and so on. … | |
hello guys I want to make a c++ program which is designed to receive some elements of a linked list by the user in a (while switch formula) and then the user can delete a specific value that he can designate . my problem is in delval function which delete … | |
![]() | Hello, I would love to create in C/C++ an array in which each cell is a pointer on a linked list of integers: can someone tell me how can I implement this ? Thank you very much for your help Begueradj ![]() |
I am attempting to program a doubly linked list template. My program is setup with the class node defined in a header file,the list itself in a header file and finally the main in a separate cpp file which calls the list header. The list header calls the node header. … | |
I have a question can you help me?? In this assignment you are going to design and implement a Dictionary system that enables the user to efficiently add, remove, and search for words using a menu-driven system. The words will be organized as shown in figure 1 below. As you … | |
This page lists different music censoring incidents starting in the 50s (Which amazes me,i didnt think anything was done like that back then) [url]http://web.archive.org/web/20040622055402/ericnuzum.com/banned/incidents/80s.html[/url] I linked to the 80s list (My favourite time period) | |
Hi, I'm trying to construct my first Doubly Linked List, but am having trouble compiling. This is my program: [B]main.cpp :[/B] [code=c++] #include <iostream> #include "node.h" #include "doublylinkedlist.h" using namespace std; int main() { system ("PAUSE"); return 0; } [/code] [B]node.h :[/B] [code=c++] class Node { public: Node *pointertonextnode;//pointer to … | |
Hello- I'm using VB.NET (visual studio) to create a chatbot (a program that mimics a human and has a text converstion with you). Two of my main classes are a word class and a sentence class. The sentence object is basically going to be a linked list of words objects. … | |
Hi guys, I have a real quick problem, or at least I hope it's really quick. The thing is, I'm studying for a computing C final, and one of the sample questions requires me to take data from a file, put it in a linked list, and then place it … | |
Can you guys check my work i want to perfect my studies at school.. this will be passed on sunday also there some that dont have answer which you know please do tell.. [QUOTE]False 1. When you go through a list of names, from beginning to end, until you reach … | |
I have a class function - which I am trying to pass array values - however the function returns the values even when I don't use the reference &. WHY? COULD SOMEONE EXPLAIN THIS? [CODE] Block example; // create an instance of the class 'Block' int Array1[3] = {0,0,0}; // … | |
I'm trying to change this program into a doubly linked list but i'm having a difficult time. Please help me out thank you.[CODE]#include <stdio.h> #include <stdlib.h> struct Node { char data; Node *next; Node *prev; }; //typedef struct node Node; typedef Node *NodePtr; void insert( NodePtr *dPtr, int value ); … | |
[B]Link Popularity[/B] [B]Intro[/B] Guide to link popularity and how it affects your search engine rankings. Link popularity refers to the number of links pointing to and from related sites and is an extremely important method of improving your site's relevancy in search engines. Use this free link popularity checker <http://www.link-popularity-checker.com> … | |
Hi, I'm having problem with my linked list. The program I'm making should read in positive and negative numbers and put them into two separate lists. The numbers should be in rising order in the list. example: input: 3 5 1 -6 -2 -1 printing out the lists: pos: 1 … | |
Hello to you all , I am required to write a program which gets a Math Expression (without checking it is good) and put in Stack only the Brackets . Implementation of Stack is One-Way Linked List Only. Examples for Good/Bad Expressions : (a*{b+c}-4/x +[e-5]) - GOOD (5+} - BAD … | |
Does anyone know how to fully set up a circular linked list, and its methods, remove, insert, and find? Here is what i have so far but i have no idea if its proper public class CLL { public class Node { int item; Node next; public Node() { this.item … | |
The program is suppose to run through a list of strings. The stings are then put through a hash function (which works fine) and then "hashed" (for lack of a better word). The index is suppose to be an array of linked Lists to handle collision problems. I guess the … | |
Hey guys, I have to write a program to check the ranking of the top 1000 boy and girl baby names using linked lists and pointers. The POINT of the PROGRAM is if you enter a name it will tell you what the name ranks among the list if it … |
The End.