Search:

Type: Posts; User: Orphious; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    827

    thnx a million stu

    I'll give these a shot!
  2. Replies
    5
    Views
    827

    I'm a little confused on second answer

    I understand that strings are containers and I can use iterators. But how could I use them if I wanted to keep track of the following in the string

    string s("-*abc");

    I'd want to keep track of...
  3. Replies
    5
    Views
    827

    Thought of one more question too

    Say I have a string d ="-*abc";
    and I want to loop through it, is there a way I can store the address location of d[i] via a pointer. Can I store it in a stack? I tried it but of course it didn't...
  4. Replies
    5
    Views
    827

    templated classes with friend functions

    I am trying to overload the >> operator in a templated class. Now normally, you could make a friend function. But I have heard that friend functions in a templated class must be inlined. Is that...
  5. Replies
    1
    Views
    959

    whats wrong here

    I'm doing something wrong here is I usually am doing :D. Perhaps we can find it. I want to overload == to compare two objects.
    The values are const refernce params, and the function should return...
  6. Replies
    8
    Views
    1,715

    does toupper()

    does toupper() only work with a character? Like could I change a whole string via toupper(stringinput) or does that not work. I tried it and spit some errors at me, so I'm guessing that it doesn't....
  7. Replies
    8
    Views
    1,715

    I gotcha

    I see now, that was the whole point with the typedef BST mybst and vector<mybst> my_bst, etc..... I got it.
  8. Replies
    8
    Views
    1,715

    k, I'll check out the palindrome

    How does my insert fit into what you gave. my_bst[toupper(*it[0]) - 'A'].stringBST.insert(*it); doesnt seem to work. Is there a way that I am not thinking of? thanks
  9. Replies
    8
    Views
    1,715

    one more quick note

    let me say how this works as of now.

    you declare the class like so,
    BST<string> stringBST;
    that will construct an empty tree named stringBST.
    then you insert via stringBST.insert(value);...
  10. Replies
    8
    Views
    1,715

    stu,

    Ya it does have to be a vector. I think I understand what you are saying, though I did get a little lost on some points. Let me ask real quick, the form to insert in the version I am using is like...
  11. Replies
    8
    Views
    1,715

    kinda random question.

    I wonder if you guys could check my logic on thinging on this problem. I am suppost to do the following:

    Say I have the following text file.

    Pigs and Cows
    Are Fat. Porsche is
    a nice car....
  12. Replies
    14
    Views
    2,713

    ah,

    well that doesn't seem to complicated. They must just word it in a confusing way to throw me off on purpose. :D Once again, thanks a bunch stu. I should just put that in my sig, I am saying it so...
  13. Replies
    14
    Views
    2,713

    oic

    So that "*this" stuff is just saying it will take the righthand, assign it to the lefthand and return the lefthand or *this?
  14. Replies
    14
    Views
    2,713

    accident

    Copied from an << and forgot to change. sorry. Was just asking about =. Didn't remove the ostream stuff. my bad
  15. Replies
    14
    Views
    2,713

    oops, let me clarify

    I want to overload the assignment operator = , thats what I was asking with the aBST and bBST. Thanks for the other info though
  16. Replies
    14
    Views
    2,713

    hmm.....not following

    Hmm.........i'm still not following. This crap is confusing :(

    I want to overload the = too, so could it be like this? Overloading thing has confused me a bit as well

    template <typename...
  17. Replies
    14
    Views
    2,713

    got it

    One more quick ? stu. I figured out the copy from what you said, but now I am suppost to overload the assignment operator( = )
    . It has same structure of copy constructor with 3 significant...
  18. Replies
    14
    Views
    2,713

    thnx for reply

    Stu,
    I should of been more specific. I understand the essentials of a preorder, inorder, and postorder. I already did functions to do those traversals. The leafs are defined as follows
    ...
  19. Replies
    14
    Views
    2,713

    Need to copy Binary Trees

    Stu, I am a little confused thinking about the logic of this. This is what I am suppost to do, perhaps you can help me with it.

    Do a preorder traversal, copying nodes as you go. You'll need two...
  20. Replies
    6
    Views
    1,237

    check this

    I use the windows and when I compiled that code, I didn't get those errors. Why not just do this

    #include <iostream>
    #include <string>
    using namespace std;

    int main(){

    string letter;
  21. Replies
    8
    Views
    1,669

    jeez, you know everything

    Is this seemingly neverending knowledge just from years of work, or did you just get it and it was always easy for you. Because if it was, I am trying to do the wrong thing, because is sure isn't...
  22. Replies
    8
    Views
    1,669

    OIC

    Once again, thank you stu. You are quit the asset for me :D Thanks a bunch, I really appreciate it!!!!

    While we are on the subject of int's, is there an easy way to show 1234 as 1 2 3 4 with...
  23. Replies
    8
    Views
    1,669

    well, if I knew Id be set

    But I don't. I haven't figured out how you can reverse a number with a modulus operator or even why. Something with recursion perhaps? Hell I don't know
  24. Replies
    8
    Views
    1,669

    even more, how is this possible

    Stu, is it possible to display a number in reverse order using the % operator. Like have 12345 and return it 54321 using this thing %. Doesn't that give you the remainder?

    Thanks
  25. Replies
    1
    Views
    1,320

    Stu, more ?'s cometh

    Two questions for ya
    1. This is a ? that I don't know
    Say I wanted to make this class a class template with a type parameter of DataType. How could I do this.

    class LinkedList
    {
    private:
    ...
  26. Replies
    6
    Views
    4,314

    yeah, that sure does

    Man, your just a fountain of knowledge :D. Thanks again stu!!!!!
  27. Replies
    6
    Views
    4,314

    wow

    Let me ask you what this part means
    int main(int argc, char *argv[])//the part in the parenthesis.
    {
    }
    because I have seen it this way as well
    int main()
    {
    return 0;
    }
    Whats the difference?...
  28. Replies
    6
    Views
    4,314

    Another c++ ? for stu

    I was wondering what is the easiest way to read in a string of character and check to see if they are a palindrome? Thanks stu
  29. Replies
    2
    Views
    8,259

    thnx

    That does look easier. Thanks once again Stu
  30. Replies
    2
    Views
    8,259

    c++ queues using circular arrays?

    I am having problems with an option to display the queue. The logic of how to display the queue according on where in the array the values myFront and myBack are. Like this:
    array[0] = 10
    array[1]...
Results 1 to 30 of 42
Page 1 of 2 1 2