i use delphi 2010. i need to fill the char array with spaces not nulls. i used following code which doesn't work.
procedure TForm1.FormCreate(Sender: TObject);
var
aCharArray: array[0..9] of Char;
begin
FillChar(aCharArray, sizeof(aCharArray), #32); // doesn't work
FillChar(aCharArray, sizeof(aCharArray), ' '); // doesn't work
Caption := aCharArray;
end;
the caption is printed with strange crosses. in an array of ansichar it works well.
please let me know the reason and the solution.
thanks.