首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

怎么实现常量数组赋值给记录中动态数组()急

2012-03-05 
如何实现常量数组赋值给记录中动态数组(在线等)急!急!急!RTex.typeTcrecordb:array of Integerendconst

如何实现常量数组赋值给记录中动态数组(在线等)急!急!急!
RT

ex.
type 
  Tc=record
  b:array of Integer;
  end;
  const a:array[1..5] of Integer=(1,2,3,4,5);

begin
  //How to assign a to b? 
end;



[解决办法]

Delphi(Pascal) code
var  c:tc;begin  c.b:=@a;end;
[解决办法]
楼上的没错,不过最好这样
Delphi(Pascal) code
var  c: Tc;begin  c.b := @a;  SetLength(c.b,5);end; 

热点排行