C++ Member Function Pointers (Help!) menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Amrok's Avatar Banned
    Reputation
    4
    Join Date
    Apr 2009
    Posts
    59
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C++ Member Function Pointers (Help!)

    Hi, im currently trying to learn a bit more about C++

    i've got some class
    Code:
    class MyClass
    {
    	bool m_pMemberFunctionValue;
    
    	public:
    		MyClass();
    		~MyClass();
    
    		bool MemberFunctionTest() const;
    };
    
    bool MyClass::MemberFunctionTest() const
    {
    	return m_pMemberFunctionValue;
    }
    
    bool SomeRemoteFunction()
    {
    	MyClass *pObject;
    	return pObject->MemberFunctionTest();
    }
    In this case SomeRemoteFunction should return MyClass::m_pMemberFunctionValue. Now my question...
    Is there a way to use my own constructor (MyClass()) if i create a new MyClass *Object?
    Last edited by Amrok; 10-09-2011 at 06:36 AM.

    C++ Member Function Pointers (Help!)
  2. #2
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Amrok View Post
    Is there a way to use my own constructor (MyClass()) if i create a new MyClass *Object?
    Uhm, have you tried using new maybe?

  3. #3
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Locking this thread because it's retarded and any decent C++ book or tutorial explains how to use pointers and create objects on the heap.

    This is not the "Programming for Dummies" section. Read the rules and consider yourself warned:
    http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-memory-editing/217837-memory-editing-section-rules.html (Memory Editing Section Rules)

Similar Threads

  1. [Help me]Problem with using function pointer in Debug builds
    By wanyancan in forum WoW Memory Editing
    Replies: 6
    Last Post: 01-06-2010, 05:06 AM
  2. [General] Multiple Pointers Help
    By Malstrom in forum WoW Memory Editing
    Replies: 2
    Last Post: 06-06-2009, 03:11 AM
  3. C# function pointers
    By lanman92 in forum Programming
    Replies: 8
    Last Post: 06-05-2009, 01:24 PM
  4. The typedef keyword. Functions, function pointers, and you.
    By Cypher in forum WoW Memory Editing
    Replies: 16
    Last Post: 01-07-2009, 12:10 AM
  5. 3.0.2 some function/pointer addresses
    By g3gg0 in forum WoW Memory Editing
    Replies: 6
    Last Post: 11-04-2008, 12:23 AM
All times are GMT -5. The time now is 03:46 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search