i'm a newbie in this forum...and i find it very cool!
So, i'm not an experienced C++ developer and I'm messing around with some dlls:
so here's a problem I have encountered:
in a project I have a base class BC (say private members are x,y) and a derived class DC (say private members are x,y,z) which inherits from the previous class. I also have a function foo in another cpp file which I want to export it to Excel through a dll. In the body of the function foo, I construct and initialize an object DC(x,y,z). Everything works fine if I run this function in C++...inheritance works as expected. But when I try to run it from Excel using the constructed dll, it seems as if the private members x,y were never initialized, while z is correctly initialized!!! (in fact I figured that out by making the function FOO output x,y,z in Excel; z comes out correctly, but x,y come out as 1376260, which of course has no relation to the value they were initialized) So, do you have any ideas about how to resolve the problem?