C++ DWORD* to BYTE*
        Posted  
        
            by 
                NomeSkavinski
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by NomeSkavinski
        
        
        
        Published on 2012-09-28T15:24:41Z
        Indexed on 
            2012/09/28
            15:37 UTC
        
        
        Read the original article
        Hit count: 235
        
c++
|optimization
My issue, i am trying to convert and array of dynamic memory of type DWORD to a BYTE. Fair enough i can for loop through this and convert the DWORD into a BYTE per entry.
But is their a faster way to do this? to take a pointer to DWORD data and convert the whole piece of data into a pointer to BYTE data? such as using a memcpy operation?
I feel this is not possible, im not requesting an answer just an experienced opinion on my approach, as i have tried testing both approaches but seem to fail getting to a solution on my second solution.
Thanks for any input, again no answers just a point in the right direction. Nor is this a homework question, i felt that had to be mentioned.
© Stack Overflow or respective owner