Search:

Type: Posts; User: joenching

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    2,092

    Thanks so much for it. It makes my mind better....

    Thanks so much for it.
    It makes my mind better. :p
  2. Replies
    8
    Views
    2,092

    1) I think I can create the objects from either...

    1) I think I can create the objects from either the default constructor - apple and the one I can type the parameter - Applestack(int s, string str).

    2) the methods - void display()

    3)...
  3. Replies
    8
    Views
    2,092

    I don't really understand what you said. For me,...

    I don't really understand what you said.
    For me, I realize if i create an object and insert elements inside the obects, then i can use a for loop to show each elements.
    but the problem is i don't...
  4. Replies
    8
    Views
    2,092

    So, according the rules, so the object is not a...

    So, according the rules, so the object is not a stack object and it doesn't .empty() operator?

    And If I want to cout the elements inside this object, what should I do?

    Thanks for advance.
  5. Replies
    5
    Views
    1,471

    Can you give me some advice? My idea is : ...

    Can you give me some advice?
    My idea is :


    If (the object is empty)
    {
    throw an exception
    }
    else
    returns the card at the top of the stack.
  6. Replies
    8
    Views
    2,092

    Question about cout an stack object?

    I created an object called MyRowstack form the class Rowstack


    Rowstack MyRowstack; // Instantiate a Rowstack object;


    and then I push some cards inside MyRowstack


    for(int iCtr = 0;...
  7. Replies
    5
    Views
    1,471

    I have modified the rowstack.cpp again and I...

    I have modified the rowstack.cpp again and I ignored the exception part.


    //rowstack.cpp
    #include <cstdlib>
    #include <stack>
    #include <iostream>
    #include "rowstack.h"
    #include "deck.h"...
  8. Replies
    5
    Views
    1,471

    I have remodified my code like that: However it...

    I have remodified my code like that:
    However it has 6 errors when i tried to compile it.
    Here are the error code:
    Compiling...
    rowstack.cpp
    c:\lab8\rowstack.cpp(13) : error C2039: 'push_back' :...
  9. Replies
    5
    Views
    1,471

    A TestUnit file cannot be compiled..

    Hi all, when i tried to compile those files, my compiler told me that I have 3 errors
    those errors are:
    Compiling...
    rowstackTest.cpp
    c:\lab8\rowstacktest.cpp(17) : error C2065: 'faceDownCards' :...
  10. Replies
    8
    Views
    2,088

    Thanks Sir.

    Thanks Sir.
  11. Replies
    5
    Views
    905

    Coz i am gonna to throw an exception when the...

    Coz i am gonna to throw an exception when the stack doesn't have card

    So, for the code, Can I use that?



    enum RowstackExceptions { RowstackEmpty };
  12. Replies
    5
    Views
    905

    what is that for the second link?

    what is that for the second link?
  13. Replies
    5
    Views
    905

    One more enum question

    I am creating an ADT named RowstackException which inside the class, It should contain a public enumerated typed named RowstackExceptions. There will only be one value in the enumerated type:...
  14. Replies
    8
    Views
    2,088

    So Are you mean that: Card...

    So Are you mean that:


    Card Rowstack::popFaceDownCard()
    {
    return popFaceDownCards.top();
    }


    I am not sure which variable should be coded after the return.
  15. Replies
    8
    Views
    2,088

    I think I should use Card::Card...

    I think I should use



    Card::Card popFaceDownCard()
    {
    return card.top();
    }
  16. Replies
    8
    Views
    2,088

    Here is my rowstack.cpp //rowstack.cpp...

    Here is my rowstack.cpp


    //rowstack.cpp
    #include <stack>
    #include <iostream>
    #include "rowstack.h"


    using namespace std;
  17. Replies
    8
    Views
    2,088

    A retrun card problem

    I am working on the solitaire game and I created an ADT called Rowstack. Inside the Rowstack, I have a function called
    "Card popFaceDownCard()" which returns the card at the top of the stack and if...
  18. Replies
    18
    Views
    6,148

    I also created an method VALUETYPE getItem( const...

    I also created an method VALUETYPE getItem( const string& key ) const; inside the public

    However, when I tried to compile it the HastTableTest.cpp, it shows I have 2 errors
    Here is my code from...
  19. Replies
    18
    Views
    6,148

    Do you think I should declear myHashFunction...

    Do you think I should declear myHashFunction inside the private section?
    I think those code from you should work


    int hashFunc ( char *key ) {
    int res = 0;
    while ( *key ) res += *key++;
    ...
  20. Replies
    10
    Views
    1,001

    Thanks for helping. it's quiet good.!

    Thanks for helping.
    it's quiet good.!
  21. Replies
    10
    Views
    1,001

    Would you pls explain (what source.begin() + 2,...

    Would you pls explain (what source.begin() + 2, destination.begin() + 3) for?
  22. Replies
    10
    Views
    1,001

    Do you know any STL Lists method that i can copy...

    Do you know any STL Lists method that i can copy the cards to object B?
    i am looking the MSDN guide, but still no idea..
  23. Replies
    10
    Views
    1,001

    Because i am writing a soliatire game The Deck...

    Because i am writing a soliatire game
    The Deck class is those cards which the player click the upper-left corner.
    The Pile class is those card the user can place it from the Deck class.
  24. Replies
    10
    Views
    1,001

    I see, this should be the format of copying the...

    I see, this should be the format of copying the elements from object A to object B.

    Do I need to include some specific header?
  25. Replies
    10
    Views
    1,001

    Add elememt(s) from object A to obect B

    Suppose I have two classes - Deck and Pile and I created 2 obects inside the Pile class



    Deck MyDeck; // Instantiate a Deck object.

    Pile MyPile; // Instantiate a Pile...
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4