APU
APU

Reputation: 239

How to call function "Move" in C++ Builder 6

Delphi syntax:

procedure Move(const Source; var Dest; Count: Integer);

C++ syntax:

extern PACKAGE void __fastcall Move(const void *Source, void *Dest, int Count);

I have used Function Move in Delphi long time ago,

recently I want to call it in C++ Builder 6,

I wrote it as the same as I did in Delphi,

the error appearance --> "Expression Syntax".

Dose anyone know how to call it?

or there is other function works similar to it?

Upvotes: 1

Views: 1275

Answers (1)

mh taqia
mh taqia

Reputation: 3596

BYTE src[] = "Source Data";
BYTE dst[11];
Move(src, dst, sizeof(dst));

It is better to use memmove in C++:

memmove(dst, src, sizeof(dst));

Upvotes: 1

Related Questions