Skip to main content
gamedev.net
🔒 Locked

Method Pointers

Started by Prozak Dec 28, 2002 at 2:49 AM 3 replies 150+ views
Original Post
Prozak
Prozak
Hi all, how do I create a pointer to a method in a class? ptr = class.method; Also, i''m having trouble creating a thread out of a method in a class because of this... I wanted to have a member, a method of a class be defined as a thread... can I do this? thanx for any insights,

[Hugo Ferreira][Positronic Dreams]
Visit my WebSite!

Beer Hunter
Beer Hunter
Which language? It sounds like you''re using java, but I''m not sure.
Fruny
Fruny
See "function pointers" link in signature.
Note that C++ has no ''methods'' - it has ''member functions''.


[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.