W
wqe
Hi,everyone:
the questionly code:
#include <iostream>
using namespace std;
class test
{
int x;
void func()
{
};
void func1()
{
};
public:
void f()
{
printf("%x\n",&x);
printf("%x\n",&test::func );
printf("%x\n",&test::func1 );
};
};
int main()
{
test a;
a.f();
test * ap = &a;
void(test::*pmem)(void)=&test::f;
printf("%x\n",pmem );
test b;
b.f();
test * bp = &b;
return 0;
}
if delete this 3 statements: test * ap = &a;
void(test::*pmem)
(void)=&test::f;
printf("%x\n",pmem );
test b;
in vs2003-release,in export map file and disassemble output file,
cannot
find the location of "f()".
There is an answer, the f() was defined in the class test.
but if I define test::f() out of the class test, like this:
class test
{
int x;
void func()
{
};
void func1()
{
};
public:
void f();
};
void test::f()
{
printf("%x\n",&x);
};
I also cannot find the location of "f()" in the output disassemble
file,why?
if I close the optimiztion(/0d)setting of this win32 console
program(vs2003 release), I
can find f() in the disassemble output file.
but if I open /0d,even add some parameters,returned something, and
defined
a local variable,I also cannot find f() in the disassemble output
file.
why?
the questionly code:
#include <iostream>
using namespace std;
class test
{
int x;
void func()
{
};
void func1()
{
};
public:
void f()
{
printf("%x\n",&x);
printf("%x\n",&test::func );
printf("%x\n",&test::func1 );
};
};
int main()
{
test a;
a.f();
test * ap = &a;
void(test::*pmem)(void)=&test::f;
printf("%x\n",pmem );
test b;
b.f();
test * bp = &b;
return 0;
}
if delete this 3 statements: test * ap = &a;
void(test::*pmem)
(void)=&test::f;
printf("%x\n",pmem );
test b;
in vs2003-release,in export map file and disassemble output file,
cannot
find the location of "f()".
There is an answer, the f() was defined in the class test.
but if I define test::f() out of the class test, like this:
class test
{
int x;
void func()
{
};
void func1()
{
};
public:
void f();
};
void test::f()
{
printf("%x\n",&x);
};
I also cannot find the location of "f()" in the output disassemble
file,why?
if I close the optimiztion(/0d)setting of this win32 console
program(vs2003 release), I
can find f() in the disassemble output file.
but if I open /0d,even add some parameters,returned something, and
defined
a local variable,I also cannot find f() in the disassemble output
file.
why?