hi
i am using a struct which contains "void *" I am using void * bcoz i need to assign any data type to the vdptrVal
assume a class fooCode:struct myStruct
{
CString strVal;
void *vdptrVal;
};
typedef myStruct testStruct;
Now can i retrieve the value of valInt from the struct variable temp. At any point of time when the app is executing.Code:class foo
{
private:
foo();
virtual ~foo();
CString valStr;
int valInt;
testStruct temp;
public:
void someFoo()
{
..
}
};
foo::foo()
{
CString str = "HELLO";
valInt = 10;
temp.strVal = str;
temp.vdptrVal = (void*) &valInt;//here acutally i want to store the address of the variable valInt whose value keeps chgning
}
