Here's the problem with your non-example.
Code:
C:\Documents and Settings\Owner>more test.cpp
#include <iostream>
struct Base {
unsigned long a, b, c, d;
virtual void foo(Base *b) =0;
};
struct Derived: public Base {
unsigned long e, f;
void foo(Base *b);
};
void Derived::foo(Base *b)
{
std::cout<<b->a << ' ' <<b->b<< ' ' <<b->c<< ' ' << b->d<< '\n';
}
int main()
{
Derived *d = new Derived;
d->a = d->b = d->c = d->d = 1;
d->foo(d);
delete d;
}
C:\Documents and Settings\Owner>test
1 1 1 1
I wrote this to your specification, and it ends up telling us nothing about your problem. You need to show what you are doing without taking shortcuts.