Hvordan får jeg far i værdien
void __fastcall TGetBillForm::LogListDrawItem(TWinControl *Control,int Index, TRect &Rect, TOwnerDrawState State)
{
LogList->Canvas->FillRect(Rect);
Log* pr=(*log)[Index];
drawItem(LogList,LogHeader,Rect,0,pr->time.to_str().c_str());
drawItem(LogList,LogHeader,Rect,1,pr->foliono.foliono);
drawItem(LogList,LogHeader,Rect,2,pr->roomno.roomno);
drawItem(LogList,LogHeader,Rect,3,pr->text);
switch(lt) {
case Protocol::logMinibar:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
a = a + x;
break;
}
case Protocol::logSonyGames:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
b = b + x;
break;
}
case Protocol::log2MGames:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
c = c + x;
break;
}
case Protocol::logInternet:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
d = d + x;
break;
}
case Protocol::logLaptop:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
e = e + x;
break;
}
case Protocol::logEmail:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
f = f + x;
break;
}
case Protocol::logChat:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
g = g + x;
break;
}
case Protocol::logVideo:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
h = h + x;
break;
}
case Protocol::logPayTv:{
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
i = i + x;
break;
}
case Protocol::logBill: {
char buf[50];
LogBill* p=(LogBill*)pr;
drawItem(LogList,LogHeader,Rect,4,pay_rec::price_tostr(p->price).c_str());
x = p->price;
j = j + x;
break;
}
}
}
Mit problem er atjeg skal bruge værdierne a,b,c,d,e,f,g,h,i,j i en anden fil, men hvad skal jeg skrive i denne fil for at få dat i disse værdier?
Mit andet spørgsmål er at når jeg har fået fat i dem så skal de nulstilles efter de er blevet brugt og det skal denne fil registrere hvordan gør jeg det?