2,180 Topics
![]() | |
Hi All, Been reluctant to drop this on anyone as I wanted to resolve it myself but alas it has got the better of me. I am trying to do an insert into an Access 2007 DB but keep getting a syntax error even thougt I can get the generated … | |
Hello. I'm having some trouble understanding linked lists. I've been working on trying to figure this out all week, reading through the text, looking at examples and I still can't figure it out. This is due for me by midnight tonight, so I'm reaching out as a last ditch effort … | |
[CODE]#define max 50 struct code{int bits[max];int start;};typedef struct code code; struct node{int freq;int father;int isleft;};typedef struct node node; void insert(int,int); int del(int); main() { code cd,code1[max]; node node1[max*2-1]; int i,k,n,p,p1,p2,root,rootnodes; char symb,alph[max]; for(i=0;i<max;i++) alph[i]=' '; rootnodes=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s""%d",&symb,&node1[i].freq); insert(rootnodes,i); alph[i]=symb; } for(p=n;p<2*n-1;n++) { p1=del(rootnodes); p2=del(rootnodes); node1[p1].father=p; node1[p1].isleft=1; node1[p2].father=p; … | |
Here unsystematic play with linked list structure Object Oriented style. If you have performance critical code, please do not use this but use the superb faster than list [URL="http://pypi.python.org/pypi/blist/"]blist module[/URL] (including sorted versions of main data structures). As OO newbie (though with some 30 years of other programming), I wanted … | |
I read that you can use a while loop to read the input from a text file and create a doubly linked list? How do I do that? I would appreciate if someone could show me. Thank you! | |
Ok, so I need some guidance. Am trying to implement a linked list in java. I can't get it. I have been on here - dreaminncode, wikipedia, and some other colleges sites - I still don't/can't get it. I did look at the previous threads on this but they didn't … | |
I am working on creating a linked list to connect the previous value number (or string) to another value I asked this question before I am just guessing I did it completely wrong since no one responded. So what would be the best way to start the function. I need … | |
It compiles and run but I'm stuck on the last part - I can't figure out how to iterate through the LinkedList and delete all students whose birthYear is greater than 1995 (print only students whose birthYear is less than 1995). I have to iterate after inserting all records into … | |
iv taken a list of bakery items from user in doubly linked list.. but remove func isnt working................ :( | |
hello, i have tired to sort my link list but unfortunately i can't seem to get it working. The problem i having with the sort function is that it will sort the function when i enter a member to the list at the end except for the head. Also when … | |
Hi All. I am trying to learn linked lists, and I am a little bit confused what the next pointer as well as the head pointer does. I was reading a tutorial online, and they gave this example. [CODE]#include <iostream> #include <string> using namespace std; struct Family { string nameOfFamilyMember; … | |
[CODE]#include<stdio.h> #include<malloc.h> struct node{ int info; struct node *link; }*start; void main(){ start=NULL; int n,i,el; printf("Enter the no. of elements u want 2 enter"); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&el); createlist(el); } void createlist(int data){ struct node *q,*tmp; tmp->info=data; tmp->link=NULL; if(start==NULL) start=tmp; else {q =start; while(q->link!=NULL) q=q->link; q->link=tmp; } } struct node *q; … | |
How do I apply and code a list box in visual basic 6.0, How do i link and generate a report with visual basic linked with the database table in Access 2007. | |
[CODE=C++]void List::remove_last() { if(first == NULL) { first -> data = ' '; } else { Node *newnode; newnode = new Node; newnode = NULL; newnode -> data = last -> back -> data; last = newnode; } }[/CODE] am I doing something wrong? I'm trying to remove the end … | |
Hey guys, I'm having some difficulties with this program I've been working on. Its composed of a few parts but I'm just focused on creating a linkedlist for this class. I'm trying to create seperate linkedLists for each class I'm making (just focused on teachersList) and I've been getting some … | |
Hello good day to all... is there anyone can help or suggest me how my code work successfully. Actually the code was working well, but i wanted to change it`s content to GUI form. the program description was the user must input a word/String and shuffle/scramble the word that the … | |
I'm trying to create my own linked list for handling bullets in my game. When the bullet has gone too far I want it to be removed but as soon as this is happening (when the bullet has travelled 11 steps) the game crashes. These are the functions used when … | |
I've been working on a Linked List assignment. I completed it but I still have a problem on deleting an element that has a predecessor or after an element and inserting an element after an element...can anyone give me an idea? This is what I have so far [CODE] #include … | |
I am trying to prompt the user for a series of Integers and stop when the user enter a negative number and i am trying to add the number the users entered in a linked list. I was thinking about using the scanner class but i am having problems with … | |
Hi, I have to do program that uses a for loop to traverse a linked list. I have 99% of the program done and ready to go but our professor wanted us to use a specific loop which is the loop on line 31. I don't understand what b is … | |
I have linked a database to a windows form. I have dragged the field objects onto the windows form. Prior to doing this I changed the first field object to a combo box and the last field object to a list item. I have proceeded with the following settings for … | |
Hello, I am getting an error when I try to pass a linked list and an iterator to the printList function below. For some reason it does not recognize the printList function call. I get the following error on line 39. no matching function for call to 'printList(std::_List_iterator<Event, std::allocator<Event> >&' … | |
Hey guys! I'm new to java, I have to write a program using a linked list, that will prompt a user to enter 10 names, and display them reversed. But is has to be a GUI. Any idea where i can start, or give me some clues, i would really … | |
I'm having trouble with the 3rd if statement of my code if(select == 3). Here, if the user selects '3', then they should be able to search for students (given that students have already been inputted), via their ID. The ID that is searched and the subsequent Name relating to … | |
I have to use a function to reverse print a doubly linked list of 'items'. My teacher provided me with the implementation prototype to use, which looks like this [CODE]template <class itemType> void List<itemType>::reversePrint(ostream &output) const[/CODE] The only details he had written was "reversePrint is passed the stream to print … | |
I'm a new member and this is my first post, so be gentle ;) It's been a while since I've gotten a chance to practice with recursion so to say I'm a bit rusty is an understatement. Not to mention I've never implemented it with a linked list. My current … | |
I've created a new class called BulletList2(linked list) using the built in dialog(File>New Class) which created a header file called bulletlist.h (in project folder>include) and a source file called bulletlist2.cpp(in project folder > src). header file [CODE=c++]#ifndef BULLETLIST2_H #define BULLETLIST2_H class BulletList2 { [...] } #endif // BULLETLIST2_H [/CODE] In … | |
In chain hashing how can the order of deleting a node in double linked list be O(1) it should first check for the slot which is of O(1)and then it should check for the element to be to be removed in the linked list pointed by that slot which is … | |
can any one tell me what is the advantage of using double linked list over single linked list in chain hashing during deletion and searching of the node??? | |
Here is my code so far and i`m editing it and adding some code, is there some one might tell me that this is the right way of coding list in permutation. This program is not yet complete. [CODE]package man; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; public class … | |
Hello, I have been given an h file. Below is a section of the h file, with the entire h file below it. I am trying to figure out how to invoke the section directly under this message. [CODE]template <class T> ostream& operator << (ostream& os, const List<T>& s) // … | |
Hello, I am trying to implement a linked list with an h file that was provided to me, which I cannot change. I have created a simple main() to begin, but I am getting an error on line 40 of the h file that says... "template-id 'operator<< <int>' for 'std::ostream& … | |
what is the problem with this it is printing only the first node data :( .some one pls help me...[CODE]#include<stdio.h> #include<stdlib.h> struct node { struct node *prev,*next; int data; }; void create_list(struct node *list,int n) { struct node *n1,*n2; int i; n1=list; printf("enter the data for the 1 node:"); scanf("%d",&list->data); … | |
hallo reader, im having a problem concerning recursion in C++. I ve encountered a problem that requires to find all the subsets of a set of intergers that gives a required sum, meaning.. Enter integers: 16, 3,3,13. Required sum: 19 The prog should output: 16+3=19 13+3+3=19 the maximum size of … | |
please help me in my code the error appears and i can`t figure it out. i used to write a program that will accepts the user input, but only a word then the program will scramble the word that had been inputted by the user and display it on JFrame(WINDOW) … | |
I'm doing an exercise about pointers in this C book i'm reading. This code should traverse through a linked list and there's a function that removes an entry from the list. It works, and I don't know why. The function removeEntry is undeclared int the main() function. Here's the code: … | |
I can't speak as a master coder since I have little training in it, but currently I am working on a product line optimization problem which is very demanding in terms of needing to perform allot of sorting, searching and math so in the code I am using pointers, linked … | |
need some help turning this single linked list into a circular linked list. I am completly lost on how to get the first node and link it to the last one [CODE]#include <iostream> using namespace std; struct node { int Item; node* Next; }; // end struct node* Head; typedef … | |
I have a fairly simple PHP page which is giving me some bother, and I'm hoping someone here can point me in the right direction to correct it. In the HEAD section there is a bit of CSS... [CODE].messText { position: absolute; width: 600px; top: 250px; margin: 0 auto; font-family: … | |
Hi all, I'm new in C++ and I encounter a problem with a code I found on this forum. I simply try to add an integer to a Generic Doubly-Linked list. However, when I launch the following code (main function) [CODE]DoubleLinked<int> dlist; dlist.push_back(1);[/CODE] I got the following error : [CODE] … | |
This code snippet outlines a simple, no-frills linked list. Tested under MSVC++ 2003 and Comeau, but not guaranteed bug free. Snippet includes example main() . This snippet is intended as an example of a possible implementation of a linked list class (Of which there are many variations) For a better … | |
[code] #include<stdio.h> typedef struct node { int data; struct node * link; }n; void addatbeg(n *); void display(n *); n* first=NULL; int main() { int ch; printf("%u",first); while(1) { printf("\n enter 0 to terminate else any other key"); scanf("%d",&ch); if(ch==0) break; addatbeg(first); } } void addatbeg(n* first) { int ele; … | |
havn't programmed in c++ in well over a year and taking a new class at a different college. So I completly forgot how to work with linked lists. we are doing review so notes in book/slides don't include too munch information and is all in pseudo code. at the moment … | |
I made a program and want to enter previous dates into a linkedList. My code is [CODE]package bowlinggame; import java.util.Date; import java.util.LinkedList; import java.util.TreeSet; public class BowlingGame { public static void main(String[] args) { TreeSet <String>PlayerNames = new TreeSet<String>(); PlayerNames.add("Steve"); PlayerNames.add("James"); PlayerNames.add("Bob"); for (Object o : PlayerNames) { System.out.println(o); } … | |
I am making a program of a bowling tracker. I made four names and then I have to add specific dates they played and then the score they got on those days. Then print to screen the names, the number of games they played, average score, last games score and … | |
Hi, I am doing a program using Doubly-Linked List. I am just studying C++, and still new in this field. My question are: - How can I make a method which[B] inserts a new node before the currently selected node, then makes the new node the current node[/B]? - How … | |
Hey all, I've been programming an ISBN system of sorts and I'm a little stuck (again). I want to output my linked list to a text file, so I setup the code like this: [code] void saveList(char fileName[40]) { for ( list< Publication* >::iterator it = pubList.begin(); it != pubList.end(); … | |
Hey all, I'm attempting to use an STL List to store a list of objects. Now I realise it's quite trivial to store a list of objects of my own definition. My real question is, how do I fill the list with objects that inherit from a base class. E.g. … | |
How can i sort the Last Names?? i used the Last Name to be the head so the properties or some info will follow...need help bum bump [CODE]#include <iostream> #include <string.h> #include <fstream> using namespace std; typedef struct Student { char Fname[50]; char Lname[50]; char age[50]; char ID[20]; struct Student … | |
I'm only adding this code to a few pages. I have the background changing over each linked hover, but is there anyway for me to allow one item remain that background color to indicate which page my visitors are currently on. If you can show me how to do one, … |
The End.