Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 302 results for
double-linkedlist
- Page 1
double linked list code error
Programming
Software Development
13 Years Ago
by programing
hi i make code for
double
linkedlist
.. but i didn't have a syntax erroe .. i don'…
Double LinkedList
Programming
Software Development
12 Years Ago
by pendo826
… know how to make my single linked list a
double
can anyone help? #include "MyLinkedList.h"…list = new SListNode<int>; //Set 3
LinkedList
nodes to contain 3 int variables. list->m_data …m_next->m_next->m_data = 30;//(3). //Print out the
LinkedList
. std::cout << "list = { ";…
Re: double linked list code error
Programming
Software Development
13 Years Ago
by programing
the output of mycode should insert vslue at end of linkelist and print the
linkedlist
forward and backward . also shoud dalate the tail ,, and delete a node with specific position and delete node with specific value .. .. *_*
linkedlist in C++
Programming
Software Development
12 Years Ago
by shyla
… member function and a defult constructor: void add(
double
x) boolean isMumber(
double
x)
LinkedList
(); The add function adds a new node containing…;next = newNode; tempPtr = newNode; nodePtr = nodePtr->next; } } void
linkedlist
::add(
double
x ) { listNode *newNode; listNode *nodePtr; listNode *previousNode = NULL; newNode = new…
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by shyla
…;next = newNode; tempPtr = newNode; nodePtr = nodePtr->next; } } void
linkedlist
::add(
double
x ) { listNode *newNode; listNode *nodePtr; listNode *previousNode = NULL; newNode = new… { previousNode->next = newNode; newNode->next = nodePtr; } } } [B]
linkedlist
::isMumber(
double
x) { listNode *nodePtr; int pos=-1; if ( !head )[/B] { cout…
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by shyla
…= newNode; tempPtr = newNode; nodePtr = nodePtr->next; } } void
linkedlist
::add(
double
x ) { listNode *newNode; listNode *nodePtr; listNode *previousNode = NULL; newNode… { previousNode->next = newNode; newNode->next = nodePtr; } } }
linkedlist
::isMumber(
double
x) { listNode *nodePtr; int pos=-1; if ( !head ) { cout…
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by Moschops
…the same thing over and over. This line: [B]
linkedlist
::isMumber(
double
x)[/B] You need a return type on the front… That means that at the front of it, before [B]
linkedlist
::isMumber[/B] you must put the type of object that…put bool on the front on [B]
linkedlist
::isMumber[/B], like this: [B]bool
linkedlist
::isMumber[/B] The second problem is …
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by Moschops
[CODE]
linkedlist
::isMumber(
double
x)[/CODE] You need the return type on the front of that.
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by Moschops
To recap:
linkedlist
.h - missing semi-colon on end of line 20 missing semi-colon on end of line 22
linkedlist
.cpp - line 59 should read [B]bool
linkedlist
::isNumber(int x)[/B]
linkedlist remove bug
Programming
Software Development
12 Years Ago
by zetologos
…node. [CODE] import java.util.Stack; import java.util.
LinkedList
; public class Calculator { Stack<Character> infix =…eval.remove(eval.get(i-2)); i-=2; String sum_str =
Double
.toString(total); eval.add(i, sum_str); total = 0; }…
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by mike_2000_17
In your header, you need to match the [ICODE]#ifndef linkedlist_H[/ICODE] with a [ICODE]#endif[/ICODE] at the very end of the header file. In your cpp file, if you want to use the type listNode, you have to fully specify it, i.e. [ICODE]
linkedList
::listNode[/ICODE], otherwise the compiler won't find it.
Re: linkedlist in C++
Programming
Software Development
12 Years Ago
by JasonHippy
… compiler is mentioning the problems with listNode is because the
linkedList
class itself is failing to compile due to the afore…
LinkedList Help
Programming
Software Development
16 Years Ago
by USUAggie
…std; template < class T > class
LinkedList
{ private: class ListNode{ public: T value; //… ( void ); }; //
LinkedList
[/code] [B]
LinkedList
.cpp[/B] [code=C++] #include "
LinkedList
.h" template <…"
LinkedList
.h" using namespace std; int main(){
LinkedList
<
double
> *myList = new
LinkedList
<
double
>…
Re: linkedlist remove bug
Programming
Software Development
12 Years Ago
by tunlinaung
…(eval.get(i-2)); Explanation: Let => the values in
Linkedlist
be : [9, 10, 9, /, +] => the values of…. You see that there are two duplicate 9 in
linkedlist
. So, Remove method will only remove the first element… this method stop searching and delete this element from
linkedlist
.That is why your program finally produce the incorrect answer…
Re: linkedlist remove bug
Programming
Software Development
12 Years Ago
by zetologos
I turn it into an
linkedlist
so that i can edit in the middle.
Re: LinkedList Help
Programming
Software Development
16 Years Ago
by dougy83
….e. [code] // header file template<class T> class
LinkedList
{ //... public: void AddNode(){ // addnode code here... } }; [/code] Check out the…
Re: Double linked List Iterator InsertAfter Function
Programming
Software Development
14 Years Ago
by Flapjack
… So that messed up part of it. [CODE]
LinkedList
::
LinkedList
() { //Linking head and tail head = NewNode(… and tail to a dummy node. const
LinkedList
::Iterator
LinkedList
::InsertBefore(const Iterator& Iter, const ItemType…a reference to this new node. const
LinkedList
::Iterator
LinkedList
::InsertAfter(const Iterator& Iter, const …
Double linked List Iterator InsertAfter Function
Programming
Software Development
14 Years Ago
by Flapjack
… the insertafter function in a
double
linked list. The function looks like this. [CODE] const
LinkedList
::Iterator
LinkedList
::InsertAfter(const Iterator& Iter…
Re: Double linked List Iterator InsertAfter Function
Programming
Software Development
14 Years Ago
by Flapjack
I've changed some of the code. [CODE]const
LinkedList
::Iterator
LinkedList
::InsertAfter(const Iterator& Iter, const ItemType& Item) { nodePtr …
Re: Double linked List Iterator InsertAfter Function
Programming
Software Development
14 Years Ago
by Ancient Dragon
This should fix that compiler error [code] const
LinkedList
::Iterator
LinkedList
::InsertAfter(Iterator& Iter, const ItemType& Item) { nodePtr nNode = new Node(Item, NULL, NULL); Iter.node->next= nNode; return(nNode); } [/code]
Re: Double linked List Iterator InsertAfter Function
Programming
Software Development
14 Years Ago
by Flapjack
… Dragon;991137]This should fix that compiler error [code] const
LinkedList
::Iterator
LinkedList
::InsertAfter(Iterator& Iter, const ItemType& Item) { nodePtr…
Re: Double linked List Iterator InsertAfter Function
Programming
Software Development
14 Years Ago
by Flapjack
[CODE] const
LinkedList
::Iterator
LinkedList
::InsertAfter(const Iterator& Iter, const ItemType& Item) { nodePtr …
Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by jigglywiggly
…"; typedef bool boolean; boolean istherex = true;
double
whatisx = 0;
double
d;
double
e;
double
evaluate(
double
x,
double
y, bool c) { holdingeval += ::pow(x, y… (holdingeval); } void printout() { } int main(int argc, char** argv) {
LinkedList
* sr = new
LinkedList
(); //These are the three lines I was talking about…
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by jigglywiggly
… std;
LinkedList
* storepoly = new
LinkedList
();
LinkedList
* storederiv = new
LinkedList
();
double
holdingeval =… 0; string userinput = "no"; typedef bool boolean; boolean istherex = true;
double
whatisx = 0;
double
d;
double
e;
double
evaluate(
double
…
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by jigglywiggly
…2010\projects\calcstackdriver\calcstackdriver\calcstackdriver.cpp(18): error C2086: 'int
LinkedList
' : redefinition 1> c:\users\jigglywiggly\documents\visual studio …;c:\users\jigglywiggly\documents\visual studio 2010\projects\calcstackdriver\calcstackdriver\
linkedlist
.cpp(17): error C2146: syntax error : missing ')' before identifier …
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by jigglywiggly
… std;
LinkedList
* storepoly = new
LinkedList
();
LinkedList
* storederiv = new
LinkedList
();
double
holdingeval =… 0; string userinput = "no"; typedef bool boolean; boolean istherex = true;
double
whatisx = 0;
double
d;
double
e;
double
evaluate(
double
…
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by jigglywiggly
…; #include <cmath> #include "
LinkedList
.h" #include "main.h" using… namespace std; void
LinkedList
::add(string imissjava) { if(head == NULL){ head… node(); temp->next->data = imissjava; } } void
LinkedList
::get() { temp1=head; while( temp1!=NULL ) { cout …
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by jigglywiggly
I beleive I did paste the add method, it's in
LinkedList
.cpp [code]void
LinkedList
::add(string imissjava) { temp = (node*)malloc(sizeof(node)); temp->data = imissjava; // store data(first field) temp->next=head; // store the address of the pointer head(second field) head = temp; }[/code]
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by mrnutty
… one?[/QUOTE] He shows it at the beginning : [code] void
LinkedList
::add(string imissjava) { temp = (node*)malloc(sizeof(node)); temp->…
Re: Making a linkedlist super fail
Programming
Software Development
14 Years Ago
by mrnutty
… this the get method you are talking about : [code] string
LinkedList
::get() { temp1=head; while( temp1!=NULL ){ cout<< temp1…
1
2
3
6
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC