|
Author
|
Message
|
|
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
|

12-15-2011
, 15:45
Re: memcpy() equivalent?
|
#1
|
Quote:
Originally Posted by Xellath
Afraid there's no equivalent of memcpy() in the AMXX toolkit.
You could do something like this however:
Code:
new Input[ ] = { 3, 1, 3, 1, 3 };
new Output[ 6 ];
memcpy( Input, Output );
// Output: "31313"
memcpy( const Input[ ], Output[ ] )
{
for( new InputIndex = 0, Length = 0; InputIndex < sizeof( Input ); InputIndex++ )
{
Length += formatex( Output[ Length ], charsmax( Output ) - Length, "%i", Input[ InputIndex ] );
}
}
|
Why are you using a string? He just wants to copy memory. You are actually converting the memory to something else.
__________________
Last edited by fysiks; 12-15-2011 at 15:46.
|
|
|
|