Search:

Type: Posts; User: javapenguin

Search: Search took 0.11 seconds.

  1. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    How am I pushing my luck? I posted all the code that was needed. I've already had to submit it but can't find the button to mark the thread solved.

    If you mean earlier, I'm done trying to be...
  2. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    Ok, now all the program is written(I mean coded, not correct, or even correctly coded probably for that matter). Now please help me figure out the errors.

    DoublyLinkedList.h


    #ifndef...
  3. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    I'm really baffled about this type of message.



    Polynomial::Polynomial(float *array, int degree)
    {

    list = new DoublyLinkedList<Term(float, int)>();
  4. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    Please help. I've done what you wanted. And this is due soon.

    What is wrong with

    DoublyLinkedList<Term(float, int)> *list;

    ?
  5. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    Anybody there? ~X(~X(~X(:!!:!!:!

    I've also get a bunch of errors in Polynomial.cpp



    #include <iostream>
    #include <cmath>
    #include <string>
    #include "Polynomial.h"
  6. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    What's causing all the

    Polynomial.cpp:[insert line here]: error: request for member ‘(insert name here)’ in ‘((Polynomial*)this)->Polynomial::list’, which is of non-class type...
  7. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    I fixed a ton of errors, but am still getting all of these


    DoublyLinkedList.h: In instantiation of ‘DoublyLinkedList<Term ()(float, int)>’:
    Polynomial.cpp:12: instantiated from here...
  8. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    #ifndef _TERM_H_
    #define _TERM_H_

    class Term
    {

    public:

    Term(float coefficient, int power);
    Term(const Term& term);
  9. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    DoublyLinkedList.h is completed! How does it look? Do I need to clear up all the previous pointers in the DoublyLinkedList destructor or is that already taken care of?



    #ifndef...
  10. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    As I'm worried about the stability of my hard drive, I will be posting code here quite frequently:



    #ifndef DOUBLY_LINKED_LIST_H
    #define DOUBLY_LINKED_LIST_H

    template <class T>

    class...
  11. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    Will this code here deal with all of the pointers to previous?



    template <class T>
    DoublyLinkedList<T>::~DoublyLinkedList()
    {
    Node *curr, *curr2, *temp, *temp2;
  12. Re: Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    I know for the overloaded + operator, I'm supposed to basically do this:

    1.) Compare exponents of the first Term in each of the Polynomial lists. If they are equal, then add and advance both...
  13. Ok, I have an assignment that involves lists, it's in C+, and also polynomials

    It was working on bits and pieces of it and have the code in jumbles. I can fix it but I'm going to just add it as is to make it easier to add.




    Polynomial Polynomial::operator + (const...
Results 1 to 13 of 13