Thread: Heap(free store) and win32

  1. #1
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427

    Heap(free store) and win32

    Ok I've created a class with its respective .h and .cpp files and then I included it on a small win32/direct x game I am making....

    if I do this....

    Meteor *EnemyMeteor=new Meteor;
    EnemyMeteor->SetX1Coordinate(100);

    it doesn't work while this DOES


    Meteor MeteorList;
    MeteorList.SetX1Coordinate(125);

    is it illegal to create a object on the heap while within a win32 application?
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  2. #2
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    No, you have a problem elsewhere. What does "doesn't work" mean?

  3. #3
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    What do you know it works now....it works now.......it freaking works now!!! Thank you, I think that I was trying to create the object globally before creating the windows, thanks. It does work.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  4. #4
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    Also I wasn't initialzing the constructor and destructor..........declared it but didn't initialized.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about fwrite under win32 platform
    By naruto in forum C Programming
    Replies: 2
    Last Post: 08-16-2004, 07:30 AM
  2. Using standard C fscanf function with win32 save dialog
    By korbitz in forum Windows Programming
    Replies: 1
    Last Post: 04-08-2004, 03:31 PM
  3. Textbox in Win32 API ???
    By actionbasti in forum Windows Programming
    Replies: 1
    Last Post: 11-07-2003, 02:29 AM
  4. using 'cin' like function in win32 application.
    By blacksheep in forum C++ Programming
    Replies: 2
    Last Post: 01-30-2003, 02:49 PM
  5. Win32 API
    By Liger86 in forum Windows Programming
    Replies: 2
    Last Post: 01-30-2003, 02:19 PM