I have declared outputBuffer as a Byte and used it accordingly:
TFile.WriteAllBytes(outputPath, outputBuffer);
When I compile my program, Delphi outputs:
[DCC Error] StormLib.pas(56): E2010 Incompatible types: ‘System.TArray[System.Byte] and ‘Byte’
Have I used the wrong/out-dated data type for my variable? What must I do to get my program to compile?
Thank you in advanced!
Use
TBytesinstead. TheWriteAllBytesmethod takesTByteswhich is defined asTArray<Byte>and so is an array of bytes, not just a singleByte.