2,179 Topics
![]() | |
How can I make a student data base using linked list in c++. | |
New here, and still pretty new to javascript. I have a page that I'm trying to run a number of different javascripts on. [LIST] [*]jquery-1.2.2.pack.js [*]overlapviewer.js [*]prototype.js [*]scriptaculous.js [*]lightbox.js and [*]vnu_datestamp.js [/LIST] I have no problem with the datestamp. It runs pretty well anywhere because it's a link/rel to the … | |
[code] class Node { private: int integer; Node *pointer; public: Node(int x = 0, Node *y = NULL) { integer = x; pointer = y; } int getInteger() { return integer; } Node getPointer() { return *pointer; } }; [/code] [code] private: Node *stack; Node *top; int listSize; int pushedValue; … | |
[CODE]/*Task: Two ordered linklist contain number. eg.1->2->3-> and 2->3->5 **Print** union of them eg.1->2->3->5 ,remove duplication, can't change linklist Problem : 1. append() might need to be modified. 2. dnot't know how to use append() to complete the task. */ #include <stdio.h> #include <malloc.h> #include <string.h> #include <stdlib.h> typedef struct … | |
Hello. Well, for creating linked lists, i always use 2 pointers: one for beginning and one for the end of the list. Is this OK? Or am i required to have just a single pointer pointing to the beginning of the list and then traverse everytime i need to insert? … | |
how can I will make a student database using linked list in c++. | |
Hi, I have some questions about multi pipe. First of all, What I should do is making 6 child processes and each of child process reduces a global value (by 1) which is saved in malloc concurrently until the value reaches 0. All I could find from google was about … | |
I have an win32 console phonebook application. Phone records are held as linked list. [CODE] struct Tel_dugum{ char name[NAMELEN]; char telno[TELNOLEN]; Tel_dugum *next; }; [/CODE] You can see the structure of the linked list above. My problem is when i search i dont want my app to search whole records … | |
Here are my questionsand my answers. Could you guys/gals tell me if i am right or wrong? Which array-based operations are O(1)? inserting item or deleting item in unsorted array Which linked-list operations are O(1)? inserting and deleteing item in unsorted lsit Which array-based operations are O(n)? traversing through the … | |
I need help doing this homework. I have spent more than a week doing this without any success The suggestion is to maintain two extra links in each node, one to the inorder predecessor and one to the inorder successor in the tree. Implement this idea, and write code to … | |
Hi, I have the following code that is meant to serve as a t9 program like the one in mobile phones. It initially loads a dictionary file, stores the values in a dictionary, and prompts the user to enter a string of numbers between 2 and 9. For some reason … | |
here is code for my assignment. I am getting: Exception in thread "main" java.lang.NullPointerException at SortedStringList.insert(SortedStringList.java:33) at TestSortedStringList.main(TestSortedStringList.java:6) Line 33 is the "while" loop in my insert. Its supposed to be a double linked list of nodes w/string in each node, alphabetically arranged. here is the code: public class SortedStringList … | |
Hello all, I have a question: What are the advantages & disadvantages of the circular linked list compared with: a. Usual linked list b. Doubled linked list Although the implementation of the usual list functions & the circular list functions are similar…when do we have to use it?? or in … | |
Hey there, I can't seem to figure out why i can't access the member '*next' from the Node class to the Shuffle function. Any help would be great. [CODE]/* llist.h * LList */ #include <iostream> #include <string> using namespace std; typedef string ElementType; class LList; class Node { protected: ElementType … | |
Hello. im having a little problem with file inclusion. im getting the following errors: error LNK2005: "long * addresses" (?addresses@@3PAJA) already defined in rere.obj fatal error LNK1169: one or more multiply defined symbols found My 3 files are as follows: mainFile.c [CODE]//Program for a singly-linked list #include "def.h" #include<stdio.h> #include<stdlib.h> … | |
Hey folks, plugging away at a new program for class and I have run into a little snag, or rather a fairly major one for my pea sized brain. We are working on constructing a sorted linked listed that will store author names as well as a sorted book list … | |
I'm trying to do the following using a linked list. [quote] delete("is",2) print 1:This 2:is 3:an 4:an 5:icorrect 6:sntence delete("an",3) print 1:This 2:is 3:an 4:icorrect 5:sntence delete("icorrect",4) print 1:This 2:is 3:an 4:sntence insert("incorrect",4) print 1:This 2:is 3:an 4:incorrect 5:sntence delete("sntence",5) insert("sentence",5) print 1:This 2:is 3:an 4:incorrect 5:sentence neighbors("is") 2:is previous:This … | |
SinglyList.h [CODE] #ifndef SINGLYLIST_H #define SINGLYLIST_H #include <iostream> #include <string> using namespace std; class Exception { private: string errMsg; public: Exception(const string& err) { errMsg = err; } }; class InvalidPositionException : public Exception { public: InvalidPositionException(const string& err) : Exception(err){} }; class EmptyException : public Exception { public: EmptyException(const … | |
I'm working on an assignment where we are to implement an address book that holds standard information (ie. Name, Address, City, State, Zip) and contains a user interface to provide options to add, delete, or modify records, search for a specific record, or display all records. These operations are to … | |
okay i have question about how to apply those to my code. first the Hashmap, i used the code it and i entered information inside dic.put(studentName, new Student( studentName, studentSurname, studentSubject, daysBookBorrowed, booksName)); this is what i put inside. now i want to extract studentName , i want the user … | |
im trying to create a short email based program that displays only the subject of each email and how many emails with that specific subject there are. However im having a few scoping errors i cant figure out in my SearchCommunication. Can anyone take a look at it and let … | |
I'm trying to code a sentence editor. So, basically the input comes form a file, and the code sorts the words. The input in the file is I not do know, theoutput is I do not know. This is what's gonna be in the input file, but it can be … | |
hi all, i have a programming assignment where i read a text file through command line arguments. i then use that information to get a list of photos (just strings, not actual images) and a list of keywords that correspond to each of those photos. i am stuck on how … | |
How would I go about finding the first/bottom element 'pushed' into the linked list stack? would I need to copy the stack, then pop the elements until I reach the first element? I'm not even sure how I would go about doing this. The only thing I can think of … | |
Hi! Im a newbie here.... I got a problem with my program...My linked list is ok but everytime I export the data to the file, things don't work in a proper way..I will show my code...pls help me...thanks... [code] labname[20]="lab445.txt"; /****************FWRITE FUNCTION**********************/ void save_data(information *lab,char labname[]) { FILE *fp; int … | |
Hey guys/gals for some reason in my main function my first while loop will not take in more than two values. any reasons why that wont happen? and just to be on the safe side, did I implement my remove function properly? [CODE]#ifndef SORTEDLIST_H #define SORTEDLIST_H #include<iostream> using namespace std; … | |
I have a scenario where i am given a file that contains info such as: (just a sample) img01.jpg|Washington DC|aquarium|puffer fish|seahorse img02.jpg|CHICAGO|AQUARIUM img03.jpg|Chicago|fish where the first section is the "image" (just a made-up name, not an actual image) and the rest of the words are keywords. ive been able to … | |
can anybody help me for making a login page .... only after successful login (with userid and password provided to user) he will be allowed for further pages. here i want to display email ids' information used by a company....the user can delete or update the emailids or can make … | |
I have the following function to delete nodes in a doubly linked list at a specified position [CODE]void Delete(struct dnode **ptr,int pos) /*pos refers to position at which element is to be deleted and ptr is the pointer to the first node in the list */ { struct dnode *temp; … | |
Cn anybody give me a program about adding nodes at the end of the list in C? I just need a basis of a program that I will be creating. I also needed its algorithm. Thanks in advance. | |
I'm getting a segmentation fault when I try to search a linkedlist using the following description: [CODE] //! Searches for the first occurrence of value v that appears in the list //! after node n //! //! @param v The value being searched for //! @param n The node in … | |
Hi guys. For some reason I cannot get the linked list to print. I want to copy it(which works) but I cannot get the list to print after copying it. Any suggestions? [CODE]#include <iostream> using namespace std; struct node { int info; node* next; }; int main() { node* list; … | |
Hello I use 2 linked list ===> Doctor ===>student the First doctor A, has three students Student_1, Student_2 and Student_3. the second doctor B, has one students Student_4. the Third doctor C, has one students Student_5. to linked student, i using this function: [CODE] Doctor * Doct; student *st1, *st2; … | |
Hi everyone. I have an homework assignment due next week. Since I am not that knowledgeable in Java, there are many times I get stuck and find myself goggling for answers which sometimes I can't get that fast. Therefore, I would like to use this thread to post several quick … | |
So I'm having trouble performing a linear search of a linked list class. The inList() search function is supposed to recieve a value for an element and search for that element, return a bool value based on whether or not the value is in the list or not. Below is … | |
Hi, I have the code to add elements at the end of the linked list using recursion. [CODE] //Adds an element at end using recursion #include<stdio.h> #include<conio.h> #include<stdlib.h> struct node { int data; struct node *link; }; void addatend(struct node **,int); void display(struct node *); int main() { struct node … | |
Hello I used 2 linked list. First : Students. Second: Doctor. Every Doctor takes a set of his students. The problem : How do I add students to the doctor? [CODE]#include <iostream> using namespace std; #include <string> struct student { string name; // current name student *next; // pointer to … | |
I'm attempting to create a function getPredecessor() in which the function recieves an int in reference to a position in the list and should return a pointer to the node [U]before[/U] that position. If the position is the first place in the list, return 0. Here's my header (followed by … | |
Hey there, I'm having some difficulty understanding how pthreads are used for writing to files and reading from files using a buffer cache. There are two data structures available: 1- The first data structure is just an array of files each index contain information about the size of the file … | |
I can't believe I'm asking this, but this assignment I was given is proving very difficult. I was asked to find the ECLOSE function of a given Epsilon non-deterministic finite automata. All it is is the BFS tree of a graph from a given point, provided that the vertices are … | |
Hi guys I'm trying to finish my assignment, I stuck in a weird situation. I'm trying to create a pointer a linkedlist. This linkedlist contains pointer to a user-defined objects (City) and I'm trying to add City to this linkedlist and then iterate through the linked list to find and … | |
Hello, I have a problem, and I'd be grateful if someone could help me solve it. It's divided in two parts: 1. Record a sound using only code (Doesn't have to be in c++) 2. Being able to use the sound of a hanclap and use it to trigger an … | |
I'm writing up a program for a class I'm taking where I need to make a linked list stack & queue. Right now I'm not quite done, but I'm having problems calling the functions from the .h file. What's happening is in the while loop, I'm trying to get data … | |
this is a program that my teacher gave me in the class. but i didn't understand it....please explain it to me step by step... [code= c++] #include<iostream.h> class queue { int element; queue* next; public: queue* enqueue(queue*,int); queue* dequeue(queue*); void queue_display(queue*); }*head,*tail,object; queue* queue::enqueue(queue* head,int key) { queue* temp; temp=new … | |
Hello I tried to delete all the Linked List But I can not so Is there a way to delete the all Linked List? [CODE]struct input { int id; struct input * next; }; typedef struct input ie;[/CODE] [CODE]class input_events { typedef struct input ie; private: ie *l; public: ~input_events(); … | |
Hi, The following code is for traversing the linked list: [I]node[/I] is a [I]structure[/I] and [I]next[/I] is a pointer to next node declared in [I]node.[/I] [I]start[/I] is the pointer to the first node. [CODE] node* temp = start; while(temp != NULL) temp = temp->next; [/CODE] I dont understand the statement … | |
I need to implement a function which ads elements to a single linked list: -if the head(first element) of the list doesn't exist(if head is NULL), then the added(inserted) element becomes the head(the the data entered is of string type) -if the head already exists, insert it after the last … | |
My program is supposed to sort a doubly linked link alphabetically, and each node contains a single word string, my program crashes when it gets this far, whats missing?? void List::sortAlpha(){ Node * temp; temp=start; while(temp!=NULL){ string a=temp->word; string b=temp->next->word; string c; if(a[0]<b[0]){ c = a; a = b; b … | |
how would i go on about adding an item into an array. the catch here, is that instead of adding content normally, i want the added content to be added as a linked list. for example, if i add something into the first slot, and want to add another item … | |
i need help making an add function for an array. i know how to initialize it and have it started. when i add content into the array, i need to add it as a linked list. i have my function for the linked list completed alrady. if anyone can help … |
The End.