Search:

Type: Posts; User: EDL

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    10,993

    Ok, I think I got it working now. In case anyone...

    Ok, I think I got it working now. In case anyone wants to see what seems to be working code, here it is:



    void compclass::addstudent(char tname[]) {
    student *newstud = new student;
    student...
  2. Replies
    4
    Views
    10,993

    Ok, well, I got it partially working now. It...

    Ok, well, I got it partially working now. It will add on to the top of the list and to the end of the list, but will not add any names in between. So i can add say, John, then I can add Jim, then...
  3. Replies
    4
    Views
    10,993

    Yeah, my code really makes no sense the more I...

    Yeah, my code really makes no sense the more I look at it. I actually changed the count statement to



    if (studentlist != NULL)


    No luck though getting this function to work properly...
  4. Replies
    4
    Views
    10,993

    Inserting alphabetically into a Linked List

    I'm having trouble figuring out how to do this. I think I'm sort of close.



    void compclass::addstudent(char tname[]) {
    student *newstud = new student;
    student *head = studentlist;...
  5. Replies
    15
    Views
    1,964

    Re: try another

    Hehe, let me know how it turns out. I'm curious why it's not working for you.
  6. Replies
    15
    Views
    1,964

    Maybe it's a problem with your compiler? I don't...

    Maybe it's a problem with your compiler? I don't know, this seems like pretty basic C++ so I would assume it shouldn't have any problems with the code. Here is exactly what I put into my compiler....
  7. Replies
    15
    Views
    1,964

    What compiler are you using? I use Visual C++ 6.0

    What compiler are you using? I use Visual C++ 6.0
  8. Replies
    15
    Views
    1,964

    Re: New errors.

    Hmmm, I have no idea what that error is. I just tried to compile your program, and it runs fine for me. I deleted the #define, set int ihave = 188;, and then switched the other 2 lines around.
  9. Replies
    15
    Views
    1,964

    Also, I can't really understand what you're...

    Also, I can't really understand what you're trying to say, but Try this:




    ihave -= lost;
    ihave += money;
  10. Replies
    15
    Views
    1,964

    i think try deleting the #define and then set ...

    i think try deleting the #define and then set

    int ihave = 188;
  11. Replies
    15
    Views
    1,964

    Hmmm, I can't really remember, but I don't think...

    Hmmm, I can't really remember, but I don't think you can #define ihave and have it as an int at the same time. try



    int ihave = 188;
  12. Replies
    3
    Views
    1,275

    Err, I just noticed that you had set head, prev...

    Err, I just noticed that you had set head, prev and curr to NULL. I tried it again your way, and it works. :)
  13. Replies
    3
    Views
    1,275

    I thought that would work, as the explanation...

    I thought that would work, as the explanation totally made sense to me, but for some reason, it still gives me that error. Actually, working on it just now, with a variation on yours, I got it to...
  14. Replies
    3
    Views
    1,275

    Linked List help needed

    I'm having trouble figuring out what is wrong with my program. It compiles fine. I can seem to delete any grade in the list, except for the head. Any other grade deletes fine, and I am able to...
  15. Hey, thanks a ton!!! :D That worked.

    Hey, thanks a ton!!! :D That worked.
  16. Sorry, I don't think I was clear enough earlier. ...

    Sorry, I don't think I was clear enough earlier. That was my derived class, which I usually put virtual keyword in front of functions in there just in case I ever derive a class off of that class. ...
  17. Replies
    8
    Views
    3,782

    Hey, what I usually do in that case, is put a...

    Hey, what I usually do in that case, is put a cin.ignore(); in right before the line it tends to skip. I don't know if that is good coding practice, lol. But it works. :)
  18. Can you put the virtual functions into a seperate .cpp file?

    Hi. I don't know if my subject really made sense, so I'll try to explain here. I have a file that contains all my classes, and in those classes are some derived classes with virtual functions in...
Results 1 to 18 of 18