Search:

Type: Posts; User: Potterd64

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    7,570

    This looks good too! Did you mean to make the...

    This looks good too!
    Did you mean to make the ID a byte instead of a dword in the CGamePieceMgr and for m_dwNumObjects in CGamePieceMgr?
  2. Replies
    17
    Views
    7,570

    That example had a typo. I think my code had the...

    That example had a typo. I think my code had the same typo though :-/. Either that or I'm not deleting properly and have a bunch of leaked memory. Thanks for your help.
  3. Replies
    17
    Views
    7,570

    Thats a good idea, I'll probably do something...

    Thats a good idea, I'll probably do something like that.
    Shouldn't this still work though?

    SomeObject *s = new SomeObject();
    for(int i=0; i < 8; i++){
    for (int j=0; j < 8; j++){
    arr[i][j]...
  4. Replies
    17
    Views
    7,570

    I actually just planned on initializing it to...

    I actually just planned on initializing it to have every spot point to the same object. This object is a special game piece that represents a spot with no game piece. Later when I put pieces on the...
  5. Replies
    17
    Views
    7,570

    psycopath, I thought that would work, but my...

    psycopath, I thought that would work, but my program crashes when I do that.
    Bubba, I'm new to c++ and didn't think a 2d array of pointers would be challenging. I thought that the best way to...
  6. Replies
    17
    Views
    7,570

    that works, but doesn't it still create 64 new...

    that works, but doesn't it still create 64 new objects? Can I have all my array slots point to one object?

    Also now I have a problem calling member functions. For instance arr[x][y]->getChar()...
  7. Replies
    17
    Views
    7,570

    wont that create 64 separate objects? I'd...

    wont that create 64 separate objects? I'd rather have each spot point to one object.
  8. Replies
    17
    Views
    7,570

    2d array of object pointers

    I have a 2d array of object pointers. It looks like this.


    someObject *arr[8][8];

    This arr array is a member of another class. I tried initializing it in a double for loop by pointing all of...
  9. Replies
    3
    Views
    1,425

    dereferencing pointers to pointers

    Hi all,

    I have a vector of pointers to objects called GamePiece
    I'm using an iterator to go through them like this...



    vector<GamePiece*> v = p1->getPieces();
    for...
  10. Replies
    1
    Views
    1,456

    Passing a pointer to a member function

    I'm new to C++ and I"m not sure how to work my way around this problem.

    I have a function that takes another function as its argument

    function(void (*)(...))

    I'd like the function that I'm...
Results 1 to 10 of 10