Hi all,
hope someone can help me out with this. I'm a C / assembler programmer so am not use to C++, which I need to use. Basically I'm using my own versions of memcpy, but for long and int rather than char. It's for fast graphics. So I have a char array which I copy to another array. But I copy as either longs or ints, much faster. for example
Code:
void * fastmemcpysprite (void *destaddr, void const *srcaddr, size_t len)
{
register int *dest = destaddr;
register int const *src = srcaddr;
len /= 4;
while (len-- > 0) *dest++ = *src++;
return destaddr;
}
but under C++ the int *dest *src says they should be void const void.
I tried changing my voids but of course this the causes errors as I'm passing an array of chars. I've Google but the couple of c++ examples seem to do it in exactly the same way I do :S
Can anyone point me in the right direction.