Search:

Type: Posts; User: dld333

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,211

    Wow, I don't know what I was thinking.. I was...

    Wow, I don't know what I was thinking.. I was making that a lot harder than it had to be.

    Thanks a lot guys.

    Daved - you are the man, thanks for the help.
  2. Replies
    12
    Views
    1,211

    Sorry, I thought new post was correct action. ...

    Sorry, I thought new post was correct action. Won't happen again.
  3. Replies
    12
    Views
    1,211

    So the only solution is going to involve...

    So the only solution is going to involve pointers.....?



    -Never knew, thats SWEET!
  4. Replies
    12
    Views
    1,211

    Hmmm.. Using those pointers in my pop()...

    Hmmm.. Using those pointers in my pop() function, bit confused.
  5. Replies
    12
    Views
    1,211

    Current is the index of the top of the stack. ...

    Current is the index of the top of the stack.

    I need to Delete the value that is in the current location, then return that value, then decrement current.




    Won't that just delete current -...
  6. Replies
    12
    Views
    1,211

    Help on how to properly return a value

    I need this function to return the value in the 'current' location, then decrement the current value.

    My question is, how do I return, but then still decrement after that return in the same...
  7. Replies
    17
    Views
    6,284

    Daved, you around?

    Daved, you around?
  8. Replies
    17
    Views
    6,284

    Crap.. Do you know of any way to accomplish...

    Crap.. Do you know of any way to accomplish this?

    I thought this would work:



    int Stack::pop()
    {
    if(current == 0)
    return 0;
  9. Replies
    17
    Views
    6,284

    So I should change code around in the Stack Class...

    So I should change code around in the Stack Class pop() member function? Opposed to messing with the SearchableStack Class add() func.?

    Thanks.
  10. Replies
    17
    Views
    6,284

    I was returning the next item in the stack.. ...

    I was returning the next item in the stack..

    Dont think this effects my issue - ?
  11. Replies
    17
    Views
    6,284

    Current is the number in which spot the top of...

    Current is the number in which spot the top of the stack is.

    So if the stack has: 333, 4, 44, 2
    Current = 4
  12. Replies
    17
    Views
    6,284

    Also you may see the: ...

    Also you may see the:



    //SearchableStack.cpp

    #include <iostream>
    #include "SearchableStack.h"
    ; //i have no freaking clue...
    using namespace std;
  13. Replies
    17
    Views
    6,284

    Ok, I updated the SearchableStack Class using the...

    Ok, I updated the SearchableStack Class using the local value since its better practice.

    Here is everything you should need - and thanks for helping!

    Test #1 (finding something in the stack):...
  14. Replies
    17
    Views
    6,284

    Inheritance using Stack Class Problem

    I am having problems implementing a SearchableStack Class as a subclass of Stack class.

    Here is the design:

    List Class -->(composition)-->Stack Class-->(inheritance)-->SearchableStack Class
    ...
  15. Replies
    13
    Views
    3,710

    Is using vectors a more efficent way of...

    Is using vectors a more efficent way of allocating dynamic memory than a linked list?
  16. Replies
    14
    Views
    1,794

    And or something like.. int main(int argc,...

    And or something like..



    int main(int argc, char *argv[])
    {
    ifstream inputFile;
    string fileName;
    char yesno;
  17. Thread: help debugging

    by dld333
    Replies
    6
    Views
    1,379

    Give the array a const size, then grow where...

    Give the array a const size, then grow where needed.
  18. Replies
    3
    Views
    1,919

    What exactly do you mean "execute a DOS command"...

    What exactly do you mean "execute a DOS command" ?

    Are you refering to accessing DOS features while in runtime?
  19. Replies
    13
    Views
    3,710

    So... delete [] list; list = temp; ...

    So...



    delete [] list;

    list = temp;


    Is that better?
  20. Replies
    13
    Views
    3,710

    Ok, I am clear with the delete - I forgot to use...

    Ok, I am clear with the delete - I forgot to use delete [], I must be drunk..
  21. Replies
    13
    Views
    3,710

    Also, I am using Length() - 1 because my length...

    Also, I am using Length() - 1 because my length function is implenmented to return the "logical" size of the array.. IE: if there is one entry in the array, its in spot 0, so the Length() with do a...
  22. Replies
    13
    Views
    3,710

    No, end is the last entry in the array. So about...

    No, end is the last entry in the array. So about deleting, I am alittle confused..

    What you are saying is: the way I delete temp - leaves the memory allocated...?

    So I need something to delete...
  23. Replies
    13
    Views
    3,710

    Dynamic Array Resizing

    I am creating a list class using a dynamic array (later I will use a linked list). I am having trouble coming up with a good Add() function. Any help would be appreciated.

    Private data members:...
  24. Replies
    1
    Views
    1,516

    Overloading

    It is to my understanding to overload the output operator (<<) you must declare the function as standalone - OK.

    And also if you want to access the private data you need to make it a "friend" of...
  25. Replies
    4
    Views
    1,404

    Ohhh, so loc++, that does make scense. Thanks!

    Ohhh, so loc++, that does make scense. Thanks!
Results 1 to 25 of 32
Page 1 of 2 1 2