I have something like this:

VOID *pVBRes;
...
pVBRes = new vposnormaltex[(Vfaces.size()/3)];
...
dynamic_cast<vposnormaltex*>(pVBRes)[i].pos = ..
reinterpret_cast<vposnormaltex*>(pVBRes)[i].tex = ..
reinterpret_cast<vposnormaltex*>(pVBRes)[i].normal =..

What cast should I use ( IF I should use, I dont know if it will work..)

Perhaps you should explain why you don't have a pointer of the correct type to begin with. pVBRes = new anotherType[someSize]; If you do this elsewhere, what is to stop you performing the wrong cast?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.