LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using array of structs with GetCtrlVal

I am using GetCtrlVal to put a value from a control into a member of a array of structures. ( the member in this particular case is a float).

 

GetCtrlVal(panel,control,&MyStruct[IndexNumber].Member);

 

When I try to compile I get the error "Lvalue required".

 

I can get around this by assigning a temporary value when I use GetCtrlVal, and then later assigning it to the structure member.

 

I would like to assign the control contents directly to the structure member.  Any ideas on how to do this?

 

Thanks,

Matt

0 Kudos
Message 1 of 2
(3,306 Views)
Just found my problem.  GetCtrlVal(panel,&control,&mystruct[index].member);  I had a "&" before the control.
0 Kudos
Message 2 of 2
(3,298 Views)