Structs
From: MatthewL (matthewl_at_btinternet.com)
Date: 12/31/03
- Next message: Ulrich Eckhardt: "Re: Structs"
- Previous message: NONE: "Hide my console application?"
- Next in thread: Ulrich Eckhardt: "Re: Structs"
- Reply: Ulrich Eckhardt: "Re: Structs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Dec 2003 14:55:28 +0000 (UTC)
Hi,
I'm having a few problems using a strucutre.
struct iCoords
{
int X;
int Y;
};
iCoords myCoords[5] = {-1, -1};
myCoords[0].X = 325;
myCoords[0].Y = 240;
myCoords[1] = {225, 340};
I can initialize the struct fine with the first line of code, but there
after it complains.
For the second and third lines where I try to initialize the two X and Y the
compiler tells me I'm missing a ';' before '.'.
One the fouth line the compiler tells me I have too many initializers.
Can anyone explain what I'm doing wrong here please? :(
- Next message: Ulrich Eckhardt: "Re: Structs"
- Previous message: NONE: "Hide my console application?"
- Next in thread: Ulrich Eckhardt: "Re: Structs"
- Reply: Ulrich Eckhardt: "Re: Structs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|