2,180 Topics
![]() | |
hey everyone, I've been a bit bored lately and have made a 'snake' game. I've made made a 10x10 grid of picture boxes and I'm holding the snake positions in a linked list. I'm changing the picture box to either 'snake.jpg' or 'blankSpot.jpg.' I have a pretty decent implementation working … | |
Hello everybody. All though I have joined recently, iv been following DANIWEB since years. I was wondering if someone could help me understand how link lists exactly work. I understand how they work in general, but when I tried to understand what the "->" operator does and how it exactly … | |
[CODE] phonenode *start_ptr = NULL; phonenode *crrnt_ptr; void alpha_order(){ phonenode *ptr, *curr, *temp; ptr = start_ptr; for(bool didSwap = true; didSwap;){ didSwap = false; for(curr = ptr; curr->next != NULL; curr = curr->next){ if (curr->surname > curr->next->surname){ temp = curr; curr = curr->next; curr->next = temp; didSwap = true; } … | |
Hi I'm using the Pascal language and I need help with the following problem. You need to find the most common word read in by a user of arbitrary length and then display the amount of times its found in the input. I placed all the words into a linked … | |
This program is (as you can see in the notation) a homework assignment I'm doing for class. I wrote the whole thing, which as far as I can tell right now is logically functional. It takes commands from a user and uses them to denote what happens to a linked … | |
I was trying to implement a queue using linked list and the problem is when i try to call dequeue() method, nothing shows up and no errors too. just NULL values for all nodes. take a look @ this code and tell me if there is anything wrong... ps. Do … | |
Hi, I am currently having problems in my upperCase function. For 20 words out of 50 in my input file, I want to capitalize the first letter. Can someone please help me with this and lead me to the right direction. I have been trying for hours to figure it … | |
Hi, I created an array of numbers which converts into letters through a number generator. I need help sorting my array letters[j] so that the output can be printed in alphabetical order. After, I am storing it in a Linked List and printing it out. So far, it just prints … | |
Hello I am trying to figure out how to create a number generator to generate a number between 65-90 (ascii capital letters) and 97-122 (ascii lowercase letters). I need to convert the number to a char and then put the char in the linked list in order while ignoring duplicates. … | |
I was wondering if anyone would care to share any links to information on Linked Lists and Doubly linked lists implementation. Thanks! | |
I'm trying to take a string of a number i.e. 123456 of any size and then convert each int in the string to an int to be added to a linked list. I.E. read 1 convert to int then add to linked list, read 2 convert to int then add … | |
I'm adding and subtracting two numbers stored in doubly linked lists. I'm not sure how to go about "lining up the decimal points" for numbers. I was thinking of traversing the lists from the head and tail keeping track of the number of iterations of the loop and then adding … | |
First off let me say please don't tell me another sort to use. I am being forced to use the QuickSort. Anyway I have some code written out and it compiles and runs and messes with the order of the list but does not sort it. I'll post the code … | |
I'm really having trouble spotting where my seg fault might be and I know a fresh set of eyes will help. Basically [code]start_ptr[/code] is the head pointer and [code]start[/code] is initialized to 0 and [code]end[/code] is initialized to the number of nodes in the list. here's the code [code] node … | |
using linked list or somthing.. | |
So, hi, this is my first post here. I can't find a good source for my problem here. My problem: Creating a linked node using classes. I managed to create a list of linked nodes but the problem was that I forgot to delete the nodes I created so now … | |
Hi All.. New here.. I'm not going to lie. This is an assignment for c++ subject in my school. I'm basically an amateur in c++. I can understand all the basic stuffs in c++, but have some problems with the pointer.. and my lecturer here.. well. She's quite poor and … | |
I am working on a program in C right now that deals with linked lists. Here is the assignment statement: [INDENT]"Write a C program called Assignment4.c, that creates a linked list of Customer data. Each entry in the list is to have the customer’s last name, first name, id (int), … | |
I am having a hard time grasping ADT using linked list. I have a struct node in a class where i have a node constructor. I cant create a link list without using the constructor. But thats where i am lost. This is what i have [CODE] #include <ostream> #include … | |
Hi I am trying to find out a way to swap two nodes in an unordered linked list. I want to find out a way where i can change the links of the two nodes so they are swapped. I know I am supposed to use the previous and next … | |
so... i have been looking at this for a good 20 minutes and it makes no sense. when i compile this simple linked list implementation, it gves me this compile error. obj\Debug\Projects\LinkedList\LinkedList.o||In function `_ZN4nodeC1Ev':| obj\Debug\Projects\LinkedList\node.o:C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\locale_facets.tcc|2497|first defined here| ||=== Build finished: 1 errors, 0 warnings ===| any ideas what … | |
Hi, I have two seperate programs below writing a short program for each. My programs run, but sometimes when I rearrange things in my program to try to get it to work, I will receive an error. I am tried to figure it out since last night, but I am … | |
Error: assignment makes integer from pointer without a cast ..i want to build an student database using linked list and in c language...but i am unable to create nodes for each variable like age,name,...i did not post the entire program but the concept is in the code...plzzz help..just tell me … | |
Can you return an array of structs in a function? I'm supposed to make a linked list where the node contains an array of structs. I'm using a grocery list thing as my array of structs. [CODE] struct grocery{ char *name; float price; }; struct node{ struct grocery list[5]; //no … | |
[CODE] void my_int_sllist::pop_back() { //head and tail pointers cout<<"enter pop_back"; //contains one node if(head==tail) { cout<<"enter head==tail?"; delete head; head=tail=0; siz--; } else { cout<<"enter's other condition"; my_int_node* temp; for(temp=head; temp->next!=tail; temp=temp->next) { delete tail; tail=temp; tail->next=0; } siz--; } } [/CODE] | |
Hi I am looking for some guidance. I have two DB tables, the tables are as follows: tblCounty countyID (int) AgentID (int) CountyName(text) tblAgent AgentID(int) Name(text) Contact Number(text) What i want to do is to use a Dropdown list control to retrieve all the county's from tblCounty then when a … | |
the problem seems to be in the show_int_sllist(). main [CODE] #include "My_Int_Sllist.h" #include <iostream> using namespace std; int main() { //Test1 my_int_sllist b; b.push_back(10); b.show_int_sllist(); return 0; } [/CODE] INTERFACE NODE [CODE] //class used to create a node class my_int_node { public: //member that stores the nodes data value int … | |
This is a method I used for adding a object, flightnode, into a linked list. Basically it takes in the value in and puts it in order based on the int flightno in the flightnode object. It works fine until a value needs to go at the end of the … | |
Was wondering if soemone could point me in the right direction with the insertafter function in a double linked list. The function looks like this. [CODE] const LinkedList::Iterator LinkedList::InsertAfter(const Iterator& Iter, const ItemType& Item) { nodePtr nNode = new Node(Item, NULL, NULL); // test if allocation was successful if (nNode … | |
I am a C++ and Java programmer and I just have a couple simple syntax questions that I can't find a clear answer to. Yes I tried Google. [B]Question 1: [/B]I found the following code on another forum. [CODE]typedef struct List { char* Name; char* Address; BOOL is_present }List_info; List_info … | |
help me with the linked list where we have parkinglot ,with class apassenger,class acar,class aParking area.the program should register passenger, driver,car also able to remove a car in parking area[code]limplementing a linked list[/code] | |
have this code and when i run it, i get the output on the screen, what i would like to do is that i can see the output on the screen and send it to an xls of cvs file. is there anyone who could chage the code and let … | |
hi all , i hope you can help me with the following : in types.h : [code=c] /* Structure of input buffer for each switch */ typedef struct InputBuffer *InputBufferPtr; typedef struct { struct List **fifo; /* Input fifos: one per output. */ void *traffic; /* Placeholder for traffic stats … | |
Sorry about a n00b question but I'm having trouble. I'm messing around with linked list to try to get a good handle on them for the program I have to write. The program below was intended to fill a link list with structures then print out each structure. Instead it … | |
[code] #include <string> #include <iostream> #include <fstream> #include <list> using namespace std; #include "mono.h" int main() { int e; string m; string z; string fname; mono * mptr; mono * mptr2; list<mono>P1; list<mono>P2; list<mono>::iterator P1itr; list<mono>::iterator P2itr; cout<<"Menu"<<endl<<endl; cout<<"A Enter two polynomials from a file"<<endl; cout<<"B Enter two polynomials via … | |
. . . . . . . Hi, I am as they say a beginner I need to create a pointer to a linked list as a member variable. I have to tried todo this a number of ways but i dont think i understand the terminology. i have a … | |
Hi all, I am trying to use some APIs found in dwmapi.dll (like DwmExtendFrameIntoClientArea), but I have some problems. If I include dwmapi.lib in the dll include list, the the app works fine on Vista, but doesn't want to run on XP since dwmapi.dll is obviously missing. I tried the … | |
I am writing a method that does insertion into a doubly linked list and I was looking for some assistance with my code to see if I was heading in the write direction and what needs to be fixed to make this work. [B]Instructions[/B] template <class T> Iterator<T> List<T>::insert(Iterator<T> pos, … | |
Hello Friends, I have a huge program having multiple malloc & free. At the end of my program, I wish to print the memory leak which has occured. There are obviously many solutions to this problem. e.g. Simplest one: 1) When you allocate the memory, keep the allocated memory pointer … | |
I have little knowledge about this algorithm method .I try to coding the part of the InsertAfter() method to insert the data after a specific location.It seems not working . [CODE] #include <iostream> #include <string> #include <conio.h> using namespace std; class Node { public: double data; // data Node* next; … | |
Iv always had trouble with templates and I always get the same error message "Error: Templates can only declare classes or functions." program is a template linked list class and I'm using the sun studio 12 C++ compiler linkedList.h file: [CODE]#include "nodeType.h" using namespace std; template <class Storeable> class LinkedList … | |
a program that parks in C++,takes the detail of passengers,driver,the car store in the link list class a pass,class acar,class aparkinglot | |
The continuing saga of Craigslist vs. the state attorneys general took another turn, with South Carolina Attorney General Henry McMaster [URL="http://www.scattorneygeneral.org/"]contending[/URL] that the continued presence of ads for "erotic services" on the site constituted a criminal violation for which Craigslist management was personally responsible, and with Craigslist management firing back … | |
Along the web development, email has made a huge contribution in wide spread of internet. E-mail is widely used and has a well-defined and universally implemented protocol and, it is a hot cake for hackers. It is easily done. Attacks on e-mail focus on two areas: the delivery and execution … | |
So many of us C forum old timers have answered the same basic questions so many times that even our occasional attempts to be humorous or creative with them seem to get dull. You'd think that by the end of week one that a programmer new to C would have … | |
| |
Hi ladies and gentlemen This program is a sample of data structure for information of students . this data structure is Linked List that include public & private filds. Its private has the other class which i named it node. node builds physical structure of linklist class. node class consist … | |
Demonstration of Linked list in java. Very simple and well commented java code for the beginners. Linked list of points are used to create a Polyline and display it More java codes at [URL="http://www.mycplus.com"]www.mycplus.com[/URL] | |
![]() | This would let you store different things of same type into one data structure, here its a list. A good and popular example would be file and folder hierarchical structure in your computer. Perhaps this is what this code demonstrates. The code has two classes [INLINECODE]File [/INLINECODE]and [INLINECODE]Directory[/INLINECODE](derived from File). … |
the code now contains snippet to create the linked list too! any questions can be directed to [U]raghu_tillu@hotmail.com[/U] |
The End.