问题描述
你好,
有人可以告诉我为什么我一边读取第二个,第三个......记录吗?
(这是我代码的一部分。 )
我已经在书本和互联网上找了它,但是juist没有看到
的问题。
TI @
Wen
int klantNr,access;
Client MutatieRec,MasterRec;
OpenBestand(access);
LeesMutatie(MutatieRec,klantNr);
而(MutatieRec.klantNr!= HV)// HV被定义为99999
{
cout<< MutatieRec.klantNr;
LeesMutatie(MutatieRec,klantNr);
}
cin .get();
-
遇见vriendelijke groet,
Wen
Hallo,
Can someone tell me why my while doenst read the second, third.... record?
(This''s a part of my code.)
I''ve looked for it in the books and on internet, but juist don''t see the
probleem.
TI@
Wen
int klantNr, access;
Client MutatieRec, MasterRec;
OpenBestand(access);
LeesMutatie( MutatieRec, klantNr);
while( MutatieRec.klantNr !=HV) //HV is defined as 99999
{
cout<<MutatieRec.klantNr;
LeesMutatie( MutatieRec, klantNr);
}
cin.get();
--
Met vriendelijke groet,
Wen
推荐答案
AFAICT,''LeesMutatie''尚未在此计划中定义。它可能是因为它不能正常工作吗?发布完整的代码,而不是一些无法验证的
片段。
AFAICT, ''LeesMutatie'' has not been defined in this program. Could it
be the source why it''s not working? Post complete code, and not some
fragments that are impossible to validate.
修改代码,如下所示。如果它打印Mutatie.klantNr等于
HV,则问题不在你提供的代码片段中。
// --- -------------------------------------------------- ----
int * klantNr,* access;
Client * MutatieRec,* MasterRec;
if(MutatieRec。 klantNr == HV){
cout<< Mutatie.klantNr等于HV。 <<结束;
}
OpenBestand(访问);
if(MutatieRec.klantNr == HV){
cout<< Mutatie.klantNr等于HV。 <<结束;
}
LeesMutatie(* MutatieRec,* klantNr);
if(MutatieRec.klantNr == HV){
cout<< Mutatie.klantNr等于HV。 <<结束;
}
while(* MutatieRec.klantNr *!= HV)** // HV * *定义*为* 99999
{
cout<< MutatieRec.klantNr;
LeesMutatie(* MutatieRec,* klantNr);
}
cin.get();
// ---------------------------------------------- -----------
-
CrayzeeWulf
Modify the code as show below. If it prints "Mutatie.klantNr is equal to
HV", then problem is not in the code fragment you provided.
// ---------------------------------------------------------
int*klantNr,*access;
Client*MutatieRec,*MasterRec;
if ( MutatieRec.klantNr == HV ) {
cout << "Mutatie.klantNr is equal to HV" << endl ;
}
OpenBestand(access);
if ( MutatieRec.klantNr == HV ) {
cout << "Mutatie.klantNr is equal to HV" << endl ;
}
LeesMutatie(*MutatieRec,*klantNr);
if ( MutatieRec.klantNr == HV ) {
cout << "Mutatie.klantNr is equal to HV" << endl ;
}
while(*MutatieRec.klantNr*!= HV)**//HV*is*defined*as*99999
{
cout << MutatieRec.klantNr;
LeesMutatie(*MutatieRec,*klantNr);
}
cin.get();
// ---------------------------------------------------------
--
CrayzeeWulf
这篇关于虽然不能去第2记录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!