T
Travis
struct Point
{
int x;
int y;
};
Point Lines[3] =
{
{0,1},
{1,2},
{2,3}
}
The above works fine. What I'd like to do is declare Lines first and
then populate the array later without having to individually add .x =
and .y= for every attribute.
Point Lines[3];
Lines[0] = {0,1};
This doesn't work. Is there someway to do that though without
Point Lines[3];
Lines[0].x=0;
Lines[0].y=1;
Thanks
{
int x;
int y;
};
Point Lines[3] =
{
{0,1},
{1,2},
{2,3}
}
The above works fine. What I'd like to do is declare Lines first and
then populate the array later without having to individually add .x =
and .y= for every attribute.
Point Lines[3];
Lines[0] = {0,1};
This doesn't work. Is there someway to do that though without
Point Lines[3];
Lines[0].x=0;
Lines[0].y=1;
Thanks