c语言代码如下:
_AttachmentSeq* att_;
……
for(i=0;i<att_->Count;i++)
{
printf("Filename:%s\n",att_->AttachmentS[i].attachinfo.Filename);
printf("Title:%s\n",att_->AttachmentS[i].attachinfo.Title);
}
……类型定义如下:
typedef struct
{
int Count;
_Attachment* AttachmentS;
}_AttachmentSeq;typedef struct//附件
{
_BinaryStream body; //文件体
_AttachInfo attachinfo; //压缩标志
}_Attachment;用pascal定义类型如下:
_Attachment= record //附件
body: _BinaryStream;
attachinfo: _AttachInfo
end;
_PAttachment = ^_Attachment; _AttachmentSeq= record
Count: Integer;
Attachments: _PAttachment;
end;
_PAttachmentSeq = ^_AttachmentSeq;最上面那段代码怎么实现?
c里面用数组方式来访问指针,delphi应该怎么实现?
_AttachmentSeq* att_;
……
for(i=0;i<att_->Count;i++)
{
printf("Filename:%s\n",att_->AttachmentS[i].attachinfo.Filename);
printf("Title:%s\n",att_->AttachmentS[i].attachinfo.Title);
}
……类型定义如下:
typedef struct
{
int Count;
_Attachment* AttachmentS;
}_AttachmentSeq;typedef struct//附件
{
_BinaryStream body; //文件体
_AttachInfo attachinfo; //压缩标志
}_Attachment;用pascal定义类型如下:
_Attachment= record //附件
body: _BinaryStream;
attachinfo: _AttachInfo
end;
_PAttachment = ^_Attachment; _AttachmentSeq= record
Count: Integer;
Attachments: _PAttachment;
end;
_PAttachmentSeq = ^_AttachmentSeq;最上面那段代码怎么实现?
c里面用数组方式来访问指针,delphi应该怎么实现?
解决方案 »
- DBGrideh的列排序
- delphi ADSL宽带如何重拨号
- 有没有针对日期/时间型的模糊查询的办法?
- reportmachine中,怎样动态设置某memo的值?或者FastReport有同样解决办法也可以。
- 解释下#0好吗?
- 在线给分........................................................点击dbgrid中的一条记录后,为什么dbgrid.selectedrows.cout的值为零
- TChart能实现这种效果吗?
- ftp传输过程中网络断开的问题
- 如何在Delphi中使用剪贴板???
- 酷爱编程似吸毒——一个高中生的诉说!--[Delphi]
- www.delphibbs.com.cn是不是假的?
- 请问cxgrid中打开空表时,能否有一条可以输入数据的空行,像其他的dbgrid一样?
{
printf("Filename:%s\n",att_->AttachmentS[i].attachinfo.Filename);
printf("Title:%s\n",att_->AttachmentS[i].attachinfo.Title);
}
var
I: integer;
S: string;
begin
for I := 0 to Att_^.Count do begin
S := format('Filename:%s', [att_^.Attachments[I].AcctachInfo.FileName]);
WriteLn(S);
S := format('Tile:%s', [att_^.Attachments[I].attachInfo.Title]);
WriteLn(S);
end;
end;