On May 12, 8:58 am, Ian Collins <ian-n...@hotmail.com> wrote:
> blackbiscuit wrote:
> > Suppose I have a class A which is defined as follows.
> > class A
> > {
> > public:
> > void f( int i )
> > {
> > }
> > };
> > A a;
> > How to get the absolute address of a.f( int )? Thank you
> > very much!
> That depends on you system's memory model.
> What's wrong with
> typedef void (A::*Fn)(int);
> Fn f = A::f;
Perhaps the fact that it won't compile

. You doubtlessly
meant:
Fn f = &A::f ;
More to the point is: what does he mean by "the absolute address
of a.f(int)"? Depending on the system I'm using, I can either
use nm piped to grep, or the linker will generate a map, which
allows me to know the address of any function in the program.
Beyond that, he'll have to explain what he wants before I can
give an answer.
--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34