Search:

Type: Posts; User: Strait

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. help plesae

    help plesae
  2. Problem with friend functions in templated linked list

    I can't figure out why I keep getting a syntax error from these functions



    NODE.H //holds a value. no problems with this class
    -------------------------------

    #ifndef NODE_H
    #define...
  3. Replies
    4
    Views
    979

    problem solved. now I'm having another...

    problem solved. now I'm having another problem.....sigh
  4. Replies
    4
    Views
    979

    Problem with template linked list

    the goal of my program is to take in two sets of any regular data type (int, double, char, etc) then be able to manipulate them. so far I'm working on input and output, but it's not working. here's...
  5. Replies
    1
    Views
    1,659

    Core dump with linked list

    I'm writing a program that randomly creates a list of integers using a node class then splits the list at a certain value and sorts the resulting two lists then outputs them. right now I get no...
  6. Replies
    4
    Views
    2,703

    in the input there has to be a 1 after the x. I...

    in the input there has to be a 1 after the x. I tried to make it more robust but my instructor told me not to bother lol
  7. Replies
    4
    Views
    2,703

    Problem with linked list addition

    okay, I'm writing a function that takes two polynomials, adds them, then outputs the result. there are two things wrong with my program:

    1) when one of the terms in the polynomial has an exponent...
  8. What is wrong with this sort function? (linked list)

    the list stores a group of terms in a polynomial



    struct term
    {
    int co; //coefficient of a term
    int exp; //exponent of a term
    term* link;
    };
  9. Replies
    1
    Views
    896

    Urgent!! I/O problem with linked list

    I attached the code because it's too long to post and I can't figure out what's wrong with what

    basically I'm writing a program that inputs polynomials then lets you add and subtract them (format...
  10. Replies
    9
    Views
    1,744

    I can't do list::list(const list& l1) ...

    I can't do

    list::list(const list& l1)

    because I call get_head() in the definition

    I guess I can post my code for + and the copy constructor. the class isn't really called list, I just used...
  11. Replies
    9
    Views
    1,744

    Weird problem with overloading

    I just recently started getting a syntax error with my = operator and my copy constructor, but I don't even call the copy constructor in my program. here's the relevant code:




    [code]...
  12. Replies
    3
    Views
    1,223

    ah, thank you very much. I knew it was something...

    ah, thank you very much. I knew it was something simple like that
  13. Replies
    3
    Views
    1,223

    Linked List headaches

    okay, I'm writing a program that manipulates polynomials. the input looks like this: 2x3+3x2+4x+1

    right now I'm working on the input and output functions. so far I've been able to successfully...
  14. Replies
    7
    Views
    2,357

    there's nothing in there that has anything to do...

    there's nothing in there that has anything to do with my problem except I learned that ios::trunc doesn't really delete, it just sets file length to 0. I think that explains why my other idea wasn't...
  15. Replies
    7
    Views
    2,357

    yeah it's a text file. I'm not very familiar with...

    yeah it's a text file. I'm not very familiar with binary files

    so back to my original point, how to I rewrite the file once I've inputted from it?
  16. Replies
    7
    Views
    2,357

    void Book::print(ostream& outs) { outs

    void Book::print(ostream& outs)
    {
    outs << title << endl << author << endl << copies << endl << price << endl;
    }

    void Library::print(ostream& outs)
    {
    for (int i = 0; i < size; i++)
    ...
  17. Replies
    25
    Views
    2,381

    there's a difference between what you can get...

    there's a difference between what you can get away with and what's good programming style
  18. Replies
    7
    Views
    2,357

    Editing a data file

    okay, I've been trying this all day and I can't get it to work for the life of me. I'm trying to fill an object from a data file then possibly make changes to it and put it back.

    the data file...
  19. Replies
    12
    Views
    2,516

    I've never found an occasion where inlining...

    I've never found an occasion where inlining helped me noticeably
  20. Thread: I/O headache

    by Strait
    Replies
    5
    Views
    1,462

    sweet, it's working now. thanks, I completely...

    sweet, it's working now. thanks, I completely forgot to put ignore in there
  21. Thread: I/O headache

    by Strait
    Replies
    5
    Views
    1,462

    I accidently left the resize function out, and I...

    I accidently left the resize function out, and I think my default constructor is fine, but it's up there now

    if you need any more code let me know, I just don't want to post up more than you...
  22. Thread: I/O headache

    by Strait
    Replies
    5
    Views
    1,462

    I/O headache

    okay, I'm trying to input a bunch of data from a file then print it onto the screen. it's a little too complicated to explain so here's the code:



    //first off, here's what the data file looks...
  23. Replies
    3
    Views
    1,483

    you need to add another condition to some of...

    you need to add another condition to some of those statements



    else if ((age >= 21) && (age < 30) && (children <= 0 )) {
    cout<<"Getting ready to get a little action?\n";
    } ...
  24. Replies
    2
    Views
    1,506

    Reading from and writing to same file

    okay, hopefully this'll be my last question for the day. I got the hard part of my program done

    Basically I'm writing a program that manages a database for a library. it's a data file in this...
  25. Replies
    6
    Views
    1,889

    HA! success. I just got rid of the pointers and...

    HA! success. I just got rid of the pointers and the big 3. I misread the directions my professor gave me. I'm not supposed to use dynamic memory until the second part of this program lol.
Results 1 to 25 of 46
Page 1 of 2 1 2