Search:

Type: Posts; User: Erik Ingvoldsen

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. This is starting to get heated...I'm sorry I made...

    This is starting to get heated...I'm sorry I made you all mad. I'll finish the rest on my own.
  2. Hmmm...it tells me str does not have a type. I...

    Hmmm...it tells me str does not have a type. I tried declaring string str too, but it still does this.
  3. How do you properly delete it with stringstream? ...

    How do you properly delete it with stringstream?

    I tried putting "ss.str().erase(ss.str().end()-2);" before the return ss.str(), but this caused a segmentation fault.
  4. The solution was actually...significantly easier...

    The solution was actually...significantly easier than I thought. The problem was actually with the node itself. I forgot to make a constant function AND non-constant function for GetLeft and...
  5. Well the problem with that is that I need to run...

    Well the problem with that is that I need to run through the tree and increment nodes that have the same value as i. If I implemented a FindNote function, I'd basically just skip to the node I need...
  6. Sorry, I misunderstood that to mean that this...

    Sorry, I misunderstood that to mean that this alone wouldn't connect the node like I thought it would, not that I needed to change it. Anyway...I'm not understand what you mean by create a function...
  7. Yeah, but I have nothing to insert until I get...

    Yeah, but I have nothing to insert until I get back to the part of the function where node = NULL and I create a new node. In my function, I need to make sure that the node I've created isn't the...
  8. I read it again. I think I understand better what...

    I read it again. I think I understand better what you were saying. I've tried going back to stack, but for some reason it won't let me...does stack not work with private functions or with recursion?...
  9. I editted it, but now the test just stops after...

    I editted it, but now the test just stops after 31 (doesn't say segmentation fault or anything).


    int Insert (T i, BSTNodeT<T>*& node) {
    int count = 0;
    BSTNodeT<T>* left;
    ...
  10. Well...this is the way I saw it. I have root_(50)...

    Well...this is the way I saw it. I have root_(50) and call the function with the node left of root_ (NULL). Because I can do this, that means root_ is connected to NULL, right? NULL is changed into...
  11. Alright, I've made it to the tests. I had a few...

    Alright, I've made it to the tests. I had a few issues with ToStringForwards that I managed to fix. I'm having another issue, but I can't tell if it's with Insert or ToStringForwards. Based on my...
  12. Oh my God...I am SO sorry for not catching that....

    Oh my God...I am SO sorry for not catching that. >.< I'm sorry for wasting your time. I didn't even know having a full code in an h file was possible. I feel like such an idiot. x.x

    Alright,...
  13. Ahhh...that's very...different. So...what do I...

    Ahhh...that's very...different. So...what do I put in the cpp file? Do I even need a cpp file?
  14. That might be it. But to clarify, the source file...

    That might be it. But to clarify, the source file is the cpp file, yes? Which means in this function,


    template <typename T>
    void BSTreeT<T>::Clear() {
    Clear(root_);
    size_ = 0;
    }

    I...
  15. @Elysia I'm sorry. I know I'm really testing...

    @Elysia

    I'm sorry. I know I'm really testing your patience, but I've tried the debuggers and I've followed the guides, but I'm really struggling to understand what the problem is sometimes.
    ...
  16. ...Actually, yes, I am trying to compile it right...

    ...Actually, yes, I am trying to compile it right now.

    I also rewrote the code without templates to try and make it easier for myself and I have been able to get all the functions to compile...
  17. Compiler error is still the same, but I editted...

    Compiler error is still the same, but I editted the tree cpp file a bit.



    #include "bs_treet.h"
    #include <iostream>
    #include <cmath>
    #include <string>
    #include <cctype>
    #include <sstream>
  18. Isn't this implementing it? template...

    Isn't this implementing it?



    template <typename T>
    T BSTreeT<T>::Get (T i) {
    return Get(i, root_);
    }
  19. My apologies, my instructor has been having me...

    My apologies, my instructor has been having me use this node file for several labs now and said it'd work well with this assignment too, but I overlooked some changes that would be needed to fit with...
  20. I have difficultly understanding how to isolate...

    I have difficultly understanding how to isolate the code enough to compile and test it but...I think I've made a breakthrough. There's still some compiling issues, (from the node itself now) and I'm...
  21. Alright, I think I get it...but to be sure, does...

    Alright, I think I get it...but to be sure, does this look like the correct implementation? Or do I need to create some for or while loop to properly implement it?


    template <typename T>
    bool...
  22. Not sure what that means...so...what is the...

    Not sure what that means...so...what is the purpose of doing it?



    Starting at F...it moves left (B), then moves right (D), then moves left (C) then moves right (NULL). Or am I miss something?
  23. Alright, well, before I use this I should make...

    Alright, well, before I use this I should make sure I understand what's actually going on.


    void BSTreeT<T>::Traverse2(BSTNode<T>* node = this->root_)

    {

    You added "this->" before root_....
  24. I'm really sorry, but I'm having a little trouble...

    I'm really sorry, but I'm having a little trouble understanding your examples and what you're saying. Are you saying I need to completely rewrite the function to go through one node at a time and...
  25. OK then, this is what I got so far. void...

    OK then, this is what I got so far.


    void BSTreeT<T>::TreeTraverse2(BSTNodeT<T>* start = root_) {
    BSTNodeT<T>* node;
    BSTNodeT<T>* child;
    std::stack s;
    node = start;
    while...
Results 1 to 25 of 226
Page 1 of 10 1 2 3 4