Home > Back-end >  Piont how using a loop structure array assignment?
Piont how using a loop structure array assignment?

Time:09-23

 
PointF * point=new PointF [400].
for(int i=0; i<400; I++)
{
//point [I]=PointF (I * 10, I);
(point [I]). X=I * 10;
(point [I]) Y=I;
}
o great god show how using a loop structure array assignment? I feel I didn't send in this assignment, the example of a few basic initialization data points directly in, how do you get this much?

CodePudding user response:

You this looks no problem

CodePudding user response:

reference 1/f, Simple, Soft reply:
you look no problem this

 
Point * Point=new Point [400];
for(int i=0; i<100; I++)//399th onto the top position, the last one is the latest data is always on the bottom,
{
(point [I]). X=array1D [num - pos + I] [j] + 40 + z/W1 * 6;
(point [I]) Y=H1 - I * H1/400;

}

G.D rawCurve (pen point, 2,0.5 f);
The delete point;
Point=NULL;
, I'm so circulation assignment drawing painting not to come out, but this assignment alone can draw,
 
PointF point []={PointF (array1D [num - pos + 10] [j] + 40 + W1 * z/6, H1-10 * H1/400),
PointF (array1D [num - pos + 100] [j] + 40 + W1 * z/6, H1/H1-100 * 400),
PointF (array1D [num - pos + 200] [j] + 40 + W1 * z/6, H1/H1-200 * 400),
};
G.D rawCurve (pen point, 2,0.5 f);
great god give some directions, this individual assignment and what's the difference between the above circulation assignment? Why couldn't draw graphics

CodePudding user response:

Learn to debug, reducing the complexity,
In terms of your code, not started 100 loop, such as cycle 5 times now, and every change of monitoring parameters, see and you don't have to cycle time have what distinction. Until find out problems,

CodePudding user response:

reference 3 floor truth is right or wrong response:
learn to debug, lower the program complexity,
In terms of your code, not started 100 loop, such as cycle 5 times now, and every change of monitoring parameters, see and you don't have to cycle time have what distinction. Until find out problems,

I a constant 100 direct assignment, looking with a messagebox is 0; See always can't see with interrupt (point [I]). The value of X, the c language pointer array has always been in a daze, did not make clear
  • Related