mzsoft
Member
this is my code.
but when compile this error show.
B4X:
Sub Process_Globals
Type weekype(nfirstnum As Int,sat_time(25) As Byte)
Dim week_sel As weekype
End Sub
sub show
For k=0 To 23
week_sel.sat_time(k)=Rnd(0,2)
Next
RunNative("page_week_set_up_name", week_sel)
End Sub
#if C
void page_week_set_up_name(B4R::Object* o)
{
_weekype* tmp = (_weekype*)B4R::Object::toPointer(o) ;
char n=tmp->firstnum;
for(int y=0;y<8;y++)
{
if(tmp->sat_time[n]==1)
{
}
n++;
}
}
#End If
but when compile this error show.
B4X:
b4r_page_week.cpp:58:21: error: no match for 'operator==' (operand types are 'B4R::Array' and 'int')
if(tmp->sat_time[n]==1)
^