LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with struct

Hello,
i'm a starter with CVI and i have a problem with struct.
I need the function GetActiveTableCell(.... for read the actually positíon from my curser.
I need fpr this function the struct
typedef struct
   {
   int x;
   int y;
   } Point;
But in my projekt did't it proberlly.
I think a have a generally problem with struct.
I insert the code "typedef struc..." in the head from my projekt (were the variablen is defined) and in the underfunction i use the type.
But i become four error-massage.
-  126, 15   Redeclaration of 'Point'.
-  752, 26   Undefined size for 'incomplete struct Point defined at APA.c:752 Position'.
-  761, 70   Illegal use of type name 'Point'.
-  761, 75   Type error in argument 3 to `GetActiveTableCell'; found 'pointer to Point' expected 'pointer to Point'.

Can me help somethere.
Thanks
0 Kudos
Message 1 of 3
(3,121 Views)

Hello Wolf4142,

the typedef Point is already defined in CVI (userint.h). That is why you get the errormessages. Just leave out the typedef and your code will compile just fine.

Just a note: a "Rectangles and Points" library is available in the User Interface Library. You might find some usefull functions in there...

0 Kudos
Message 2 of 3
(3,119 Views)

Thanks for the Answer.

It's OK

0 Kudos
Message 3 of 3
(3,094 Views)