2,179 Topics

Member Avatar for
Member Avatar for tennis

I got run-time error for the following code. I am just starting to get familiar with linked list. Can any one point out what's the problem here? thanks [CODE] #include "stdafx.h" #include<iostream> using namespace std; struct node { int data; node * next; }; node* buildonetwothree() { node* head=NULL; node* …

Member Avatar for gerard4143
0
136
Member Avatar for hurbano

Hi there! I need help with my assignment. The point if it is to make an array table that will hold various linked lists that hold other items. I already have my code to add and retrieve information from a linked list. I need help making an array that will …

Member Avatar for hurbano
0
83
Member Avatar for virtualvictory

Can anyone please help me in debugging this program.This is the implementation of linked list.I have not inserted delete function.I couldn't display the data in the list properly.

Member Avatar for Ancient Dragon
0
78
Member Avatar for wittykitty

I seem to be stuck in an endless loop here and was wondering if someone could help? I am writing this method to a linked list class. There are strings of words in a file that is read into the linked list. It needs to read the last string in …

Member Avatar for Lerner
0
134
Member Avatar for maheswari c
Member Avatar for hurbano

i have written the following code for an add fucntion for a linked list implementation. when i run it, it runs correctly. when i went to class today, i found i had made a mistake. my add function adds only a student data type, whereas the assignment was to make …

Member Avatar for hurbano
0
148
Member Avatar for vskumar19

Consider a single linked list with 'n' nodes and other single linked list with 'm' nodes At the 'k'th node in 'n' ,the second linked list merges at some part of it .. jst like the shape Y Now i was asked to find out the address of Kth node …

Member Avatar for vskumar19
0
111
Member Avatar for hurbano

Ive written this program yet have stumbled upon a problem. in this program, im supposed to make a linked list of students. i must then implement some basic functions. one is to add a student (which i believe is working properly) and another is to getStudent. i believe the code …

Member Avatar for hurbano
0
100
Member Avatar for george61

Ok I have a linked list which have to read from binary file and to write in binary files. This is the function about the reading from keyboard: [CODE]short readElement( Node * newE) { int b,e,m; if ( newE == NULL ) return 1; do { printf("\n Registration number:"); scanf("%s", …

Member Avatar for prvnkmr449
0
3K
Member Avatar for dayju

#include<stdio.h> #include<stdlib.h> #include<conio.h> typedef struct { char fname[30]; char lname[30]; char MI; }stud_name; typedef struct { unsigned long idnum; stud_name name; char course [10]; int yr_level; }studtype; typedef struct { int grpnum; char subj[24]; int time_sked; int day; int units; char rmnum; }class_sked; --sir, is this a correct definition?i have …

Member Avatar for dayju
0
144
Member Avatar for Kanoisa

Hi guys. Been coding away today decided that i would update an old program i did a while ago which was the base of an organisor application. So today i converted it to use STL instead of my hardcoded double linked class. I used list<> as my original implimentation was …

Member Avatar for Kanoisa
0
326
Member Avatar for silvertooth07

i'm having a problem on the program we're tasked to do. originally, the "option" is an int but someone suggested to make it a character. i thought the problem was solved (i want to make the program print: "invalid output" if the user inputted non-numerical values) but when i tried …

Member Avatar for mike_2000_17
0
184
Member Avatar for SHENGTON

Hello, I got working code of Linked List here. But I having a problem with adding an item. I added four numbers in the Linked List. First, I added 2 then 8 then 4 and the last one 16. The result would be like this: [IMG]http://i168.photobucket.com/albums/u162/SHENGTON/display-1.jpg[/IMG] What I want to …

Member Avatar for kings_mitra
0
182
Member Avatar for Ajantis

Hey people :) My final exam is now approaching and I am practicing hard. I've come accross this task which I have no clue how to solve. It is about solving a polynomial through a linked list - and I really don't know how to even start. Can somebody help …

Member Avatar for Rashakil Fol
0
186
Member Avatar for KingJames603

On the payroll pointers program, I am struggling with a few things on the program. The data from the terminal uses malloc, for an employee node. Dynamic Memory Allocation is used in the program. For the name of each employee I can put in the First Name or First and …

Member Avatar for Ancient Dragon
0
293
Member Avatar for timb89

i am trying to insert a 2 integer values into the linked list, but the program keeps crashing after it gets to inserting into a linked list. [CODE] struct termNode { int coeff; int exp; termNode * link; }; void insertHead(int c, int e, termNode * & P) { termNode …

Member Avatar for Kanoisa
0
100
Member Avatar for timb89

I am looking to allow the user to submit a polynomial such as +3x^6 +2x^2 +9x^0 into a set of variables which would be sent to a linked list. What is the best way to separate the variables to allow them to be looked at individually. So that: C E …

Member Avatar for timb89
0
90
Member Avatar for vocater

..HEY GUYZ...Hey guys...I was trying to link the Input applet with the code such that, when the user selects like the "Edit function" it refers back to the input function with the empty spaces to fill the new Student information //Marcus Student's Database program. Using Linked List. //The prog. shud …

Member Avatar for NormR1
0
149
Member Avatar for newjava

HI,need help continuing this code, im stuck and i want to make it work Thanx import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public class WinListBs extends Frame { Button btnExec, btnExit ; Label lblNum ; TextField fldNum ; List lstVals1, lstVals2, lstCommands; Node head = null; Node …

Member Avatar for coil
0
82
Member Avatar for SHENGTON

Hello, I'm still a novice with this C programming and I got some problems with my program. I got 3 errors and 3 warnings with my Linked List. I attached an image for you to see. Someone can help me how to solve this problem? Here's my code: [CODE=C]#include<stdio.h> #include<stdlib.h> …

Member Avatar for abhimanipal
0
113
Member Avatar for aikiart7

Hello, I'm trying to understand linked list but i'm having problems with the way my text describes one aspect. This is the problem i'm having: The text says: //If there are no nodes in the list make newNode the first node and then test it like this: head =NULL; if …

Member Avatar for aikiart7
0
108
Member Avatar for MooGeek

Hi guys!! I'm currently developing an opensource CMS. but I've noticed that lots of Pro Programmers use Linked List. and of course if I want to make a opensource CMS I want to code it Professional way. that's why I've decided to use Linked List instead. the problem is I …

Member Avatar for rajarajan2017
0
146
Member Avatar for AdventGamer

I've been working with linked list and i'm currently trying to make my copyList template function work. It should return the head of the new list. Could someone give me some advice on how to fix it, currently i get no output when i try to print the copied list. …

Member Avatar for mrnutty
0
1K
Member Avatar for BlueCharge

Hello everyone. I currently have a while loop that pulls all members to a page if the username begins with the selected letter. We have a lot of members now and the "usernames beginning with "a" are quite alot. So i need to be able to have a way to …

Member Avatar for rajarajan2017
0
191
Member Avatar for gaurav_13191

Hi, I have the following code which compiles absolutely fine.. [CODE] using namespace std; #include<iostream> #include<stdio.h> #include<conio.h> struct node { int data; struct node *link; }; void add(struct node **,int); void display(struct node*); int count(struct node *); int main(void) { struct node *p; p=NULL; add(&p,5); add(&p,1); add(&p,6); add(&p,4); add(&p,7); display(p); …

Member Avatar for arkoenig
0
110
Member Avatar for andrewtrench

I have a perplexing problem which may turn out have a simple solution (hopes!). I am writing a little GUI to allow a user to enter information which will get built into an XML file which is linked to flash-based graphic. One of the fields I have is a Tkinter …

Member Avatar for andrewtrench
0
133
Member Avatar for AdventGamer

I'm currently working on a program with linked lists. The program asks you to enter five integers, and every time you enter one that integer is added to the front of the list. My issue is that for each input, i need to insert the node at the beginning of …

Member Avatar for AdventGamer
0
119
Member Avatar for rajsekhar28

SortedInsert() is a function which given a list that is sorted in increasing order, and a single node, inserts the node into the correct sorted position in the list.I know this code works fine.I am just curious to know why we can't use just single pointer to node to traverse …

Member Avatar for Ancient Dragon
0
126
Member Avatar for gaurav_13191

Hi, I have the following code which compiles fine but does not produce any output.. [CODE] using namespace std; #include<iostream> #include<cstdio> #include<conio.h> struct node { int data; struct node *link; }; void append(struct node *,int); void addatbeg(struct node *,int); void addafter(struct node *,int,int); void display(struct node *); int count(struct node …

Member Avatar for gaurav_13191
0
95
Member Avatar for smoothe19

A binary search tree can be used to sort a list. WE simply insert the list elements into a BST, initially empty, and then use an inorder traversal to copy them back into the list. Write an algorithm for this treesort method of sorting, assuming that the list is stored …

Member Avatar for smoothe19
0
149
Member Avatar for Ryan61343

i have a couple of should be simple linked list questions one of which is how to make it insert in a sorted fashion i have a way i think should work but it doesnt i can post the code if needed. also i have to delete the last n …

Member Avatar for Ancient Dragon
0
87
Member Avatar for figuer25

I just coded this implementation of a stack using a singly linked list. Its written in C++ using the STL. I believe I am complete with it but there may be functions I am forgetting or ways to improve/ optimize my code. I tried using exceptions to learn how to …

Member Avatar for figuer25
0
404
Member Avatar for assgar

Title: Comparing arrays Hello I am having a problem getting the difference between two arrays. The first array $list has all codes that can be linked to a specific id The second array $exist has the values select and linked to a specfic id. Both arrays are storing integers array …

Member Avatar for assgar
0
80
Member Avatar for figuer25

Hi so I am just trying to figure out what is wrong with my program. I am trying to implement the node class in C++. All I want to do is learn how to implement it and get it working. I am not trying to use it to create a …

Member Avatar for figuer25
0
1K
Member Avatar for sparatacus

Hi, I'm a complete newbie at web design, but have come up with a business idea for a simple price comparison website in my local area. I've registered the domain name and have a web hosting provider, so I just need a little advice about getting this project off the …

Member Avatar for sparatacus
0
125
Member Avatar for tong1

The following project is considered appropriate for a graduation dissertation in Computer Science Graduation project if the supervising professor is good in Java An English Word Statistics in Java The function may include: 1. To ask client to select a text file to open (FileDialog would be good to start …

Member Avatar for peter_budo
0
589
Member Avatar for hg_fs2002

I'm creating a linked list,adding the data I've read from file in each node but as I'm trying to print what I hold in nodes my output is some symbols.And even when I cout what I hold in my nodes in ADD function it's ok but as it goes to …

Member Avatar for mike_2000_17
0
100
Member Avatar for george61

Pretty interesting problem about linked list. This program is about autobuses. Each autobus is given by brand, registration number, number of seats, kilometres and year when the bus was made. The program is organised as menu and when you hit number it calls some function. Problematic function: it should NOT …

Member Avatar for george61
0
107
Member Avatar for rowley4

I need to modify my linked list to hold integers instead of strings by modifying the Node, List, and Iterator class. Don't know how to start this. This is my code. [CODE]#include <string> #include <iostream> #include <cassert> using namespace std; class List; class Iterator; class Node { public: /* Constructs …

Member Avatar for rowley4
0
107
Member Avatar for aea414

Hello all, I think am having problem getting the add_to_list function below to work. I created it so that it accepts a pointer to a linked list, a pointer to a char array (string) and a number for occurrence of the word. [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #include …

Member Avatar for aea414
0
204
Member Avatar for Shannanigin

OK this is what I want to do: [LIST=1] [*]Log the User in by checking with a SQL Database with a table that has user name and password. Also that table is linked to another table with all there personal information [*]After they login, they have to enter information into …

Member Avatar for khusiaaaan
0
776
Member Avatar for Niki_Fears

Blogetery.com, a free WordPress blog provider, was shut down earlier this month when their [URL="http://www.daniweb.com/news/story297729.html"]entire server was mysteriously yanked [/URL]without warning or explanation. When the site went dark, over 73,000 user generated blogs disappeared and since then there has been little to no information as who was responsible for pulling …

Member Avatar for Major Variola
0
423
Member Avatar for aranjan

Okay so this is part of an assignment I have to do, but I am confused regarding the library routine as my professor has not covered it well. So my thing is what do it do to create the library...is it just a .h file with all the functions specified …

Member Avatar for mike_2000_17
0
156
Member Avatar for lewis.112

Search Engine Optimization’s (SEO) first and foremost step is submitting site information in the form of crawler recognized format called Sitemap, an XML file with page, image and video link details. Start your Sitemap generation and submission by SEO Software Submitter Sitemap generator and submitter tools today to inform search …

0
65
Member Avatar for d34dw4rd

here is my code of a linked list with a header file however it works in debugger mode but in normal run time it crashes Please help! Here's the header: [CODE]/* Lab3 Abstract Data Type - header file */ /* Type Definitions */ typedef struct { char state[20]; int year_adopted; …

Member Avatar for d34dw4rd
0
150
Member Avatar for group256

Hello Everyone, I have been thinking about an assignment for couple of days and tried some methods but none works really perfect; I certainly don't need code, I just need some problem solving assistance. The question is, I'm supposed to read a text from a file, and then put them …

Member Avatar for vijayan121
0
163
Member Avatar for dusktreader

I notice that there are many, many threads where posters receive few if any comments. When I open these threads, it is usually obvious right away why no one has bothered to reply. The problems with these posts vary from deliberate solicitation for homework solutions to poorly composed questions. I …

Member Avatar for dusktreader
7
288
Member Avatar for emps

Ok, I have a header file that each of my source files includes: #ifndef MAIN_H #define MAIN_H #include <string> #include <vector> #include <sys/socket.h> using namespace std; extern string CONFIG_FILE; struct _msg { string prefix; string command; vector<string> params; }; struct _channel { bool bLocalOnly; string name; vector<string> users; string mode; …

Member Avatar for dusktreader
0
163
Member Avatar for smoothe19

Why is my destructor not working properly when ran with my whole code it keeps displaying 01010101010101 etc here is my code [CODE]LinkedList::~LinkedList() { NodePointer ptr = first; while(ptr != 0){ first = ptr->next; delete ptr; ptr = first; } if (first == 0) cout << "List destroyed\n"; else cout …

Member Avatar for smoothe19
0
169
Member Avatar for johnnyturbo3

Hello, Having a problem with 2 classes: a class that is used to go through file directories and collect the file names in a vector, the other just creates an instance of this class. This code is from an older version of the program so I know it works. However, …

Member Avatar for Fbody
0
808

The End.