Skip to content

Commit

Permalink
Update AppCondition.h
Browse files Browse the repository at this point in the history
Edit Getinfo code typesetting
  • Loading branch information
maoguala authored Dec 31, 2024
1 parent 1e5766c commit e639c52
Showing 1 changed file with 36 additions and 30 deletions.
66 changes: 36 additions & 30 deletions AppCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,20 @@ void SrcStuSelOpt() //MainPageOptSel()
//===================================================================
//std::string line;
std::vector<std::string> result; // save split string
while (std::getline(in, GetString)) { //save the string tempturely
std::stringstream ss(GetString); //control data string IO
std::string token;
while (std::getline(in, GetString)) { //save the string tempturely

std::stringstream ss(GetString); //control data string IO
std::string token;

// spilt from comma
if (std::getline(ss, token, ',')) GetStuInfo_Name = token;
if (std::getline(ss, token, ',')) GetStuInfo_Sex = token;
if (std::getline(ss, token, ',')) GetStuInfo_Birthday = token;
if (std::getline(ss, token, ',')) GetStuInfo_Professor = token;
if (std::getline(ss, token, ',')) GetStuInfo_Department = token;
GetStuInfoUI();
}
// spilt from comma
if (std::getline(ss, token, ',')) GetStuInfo_Name = token;
if (std::getline(ss, token, ',')) GetStuInfo_Sex = token;
if (std::getline(ss, token, ',')) GetStuInfo_Birthday = token;
if (std::getline(ss, token, ',')) GetStuInfo_Professor = token;
if (std::getline(ss, token, ',')) GetStuInfo_Department = token;
GetStuInfoUI();

}
in.close();
//===================================================================
std::cout << std::endl;
Expand All @@ -118,16 +120,18 @@ void SrcThcSelOpt()
//===================================================================
//std::string line;
std::vector<std::string> result; // save split string
while (std::getline(in, GetString)) { //save the string tempturely
std::stringstream ss(GetString); //control data string IO
std::string token;
while (std::getline(in, GetString)) { //save the string tempturely

std::stringstream ss(GetString); //control data string IO
std::string token;

// spilt from comma
if (std::getline(ss, token, ',')) GetTchInfo_Name = token;
if (std::getline(ss, token, ',')) GetTchInfo_Sex = token;
if (std::getline(ss, token, ',')) GetTchInfo_Department = token;
GetTchInfoUI();
}
// spilt from comma
if (std::getline(ss, token, ',')) GetTchInfo_Name = token;
if (std::getline(ss, token, ',')) GetTchInfo_Sex = token;
if (std::getline(ss, token, ',')) GetTchInfo_Department = token;
GetTchInfoUI();

}
in.close();
//===================================================================
std::cout << std::endl;
Expand All @@ -148,16 +152,18 @@ void SrcCrsSelOpt()
//===================================================================
//std::string line;
std::vector<std::string> result; // save split string
while (std::getline(in, GetString)) { //save the string tempturely
std::stringstream ss(GetString); //control data string IO
std::string token;
while (std::getline(in, GetString)) { //save the string tempturely

std::stringstream ss(GetString); //control data string IO
std::string token;

// spilt from comma
if (std::getline(ss, token, ',')) GetCrsInfo_Name = token;
if (std::getline(ss, token, ',')) GetCrsInfo_Professor = token;
if (std::getline(ss, token, ',')) GetCrsInfo_Content = token;
GetCrsInfoUI();
}
// spilt from comma
if (std::getline(ss, token, ',')) GetCrsInfo_Name = token;
if (std::getline(ss, token, ',')) GetCrsInfo_Professor = token;
if (std::getline(ss, token, ',')) GetCrsInfo_Content = token;
GetCrsInfoUI();

}
in.close();
//===================================================================
std::cout << std::endl;
Expand Down Expand Up @@ -497,4 +503,4 @@ void MainPageOptSel()
}
}

#endif // after #ifndef APPCONDITION_H
#endif // after #ifndef APPCONDITION_H

0 comments on commit e639c52

Please sign in to comment.