Delphi 동적 구조체 배열 전달값

689 단어
  TMultiSelectStudent = packed record
    StudentNo: string[20];
    StudentName: string[30];
  end;
  TStudentSelectRecord = packed record
    vType: string[10]; 
    IsMultiSelect: Boolean; 
    StudentName: TRoomRecord;
    studerntType: TRoomTypeRecord;
    MultiSelectstudent: array of TMultiSelectStudent ; 
  end;
  
    :
  var
    arrMsStudent: TMultiSelectStudent;
    count: integer;
    begin
       count := Length(FRSR.MultiSelectStudent[0])
       SetLength(arrMsStudent, count);
       {   SizeOf*Count ,      ,    }
       CopyMemory(@arrMsStudent[0], @FRSR.MultiSelectStudent[0],
        SizeOf(FRSR.MultiSelectRoom[count - 1]) * count);
     end;

좋은 웹페이지 즐겨찾기