//.hstruct tagPointMes
{
short int x,y,r;
int typ; 
};
struct tagRadialLineMes
{
int n120,n240,n480;
tagPointMes *pPMes;
};/.cpp
#define TOTALRADIAL 360
tagRadialLineMes LineMes[TOTALRADIAL];
tagPointMes *pAllPointMes;
int caun();
{
  ....
tagPointMes *p120,*p240,*p480;         
p120 = new tagPointMes [ 300 * TOTALRADIAL];//(1)
p240 = new tagPointMes [ 800 * TOTALRADIAL];//(2)
p480 = new tagPointMes [ 4000 * TOTALRADIAL];
}
上面是使用VC写的一段代码,怎么样将标号1,2,的地方转为采用Pascal的方式表示。

解决方案 »

  1.   

    这段话的意思就是:
      动态的创建300 * TOTALRADIAL 个元素的tagPointMes类型的数组。p120指向该数组的第一个元素地址。这个,知道了意思就不用我再写PASCAL的语法了吧?
      

  2.   

    p120 = new tagPointMes [ 300 * TOTALRADIAL];//(1)
    p240 = new tagPointMes [ 800 * TOTALRADIAL];//(2)p120   :  Array [0..300*TOTALRADIAL] of tagPointMes;