Thread: Help with Class and Pointer Syntax

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    21

    Help with Class and Pointer Syntax

    Hi,

    I have a class with a constructor
    Code:
    HTblock(int width, COLORREF color);
    I also have a stack of pointers of type HTblock called tower. I need to Apply Draw() function for each HTblock in the "tower" stack as in
    Code:
    block_pointer->Draw(m_window,x,y);
    im having trouble getting this to work as i've tried different methods to do this including assigning a temporary variable to get from the tower.push() call.
    however i cant seem to get a syntax that works. I can clarify if i am not clear in what im trying to do.

    Help would be much appreciated,
    Thanks,
    Cram
    Last edited by cram; 11-16-2004 at 09:22 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  2. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 07:05 AM
  3. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  4. syntax to pass a member function pointer to another class?
    By reanimated in forum C++ Programming
    Replies: 4
    Last Post: 11-27-2003, 05:24 PM
  5. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM