Sửa lỗi một số warning  signed/unsigned mismatch
This commit is contained in:
miti99 committed 2018-06-08 07:02:39 +07:00
1 parent 778b48ccb8
commit 7d7a6ffee1
3 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@ public:
ss.str(username);
int id;
ss >> id;
for (int i = 0; i < db_st_list.size; i++) {
for (size_t i = 0; i < db_st_list.size; i++) {
if (db_st_list.list[i].st_number == id) {
db_st_list.removeFromList(i);
return 1;
@@ -44,7 +44,7 @@ public:
}
}
else {
for (int i = 0; i < db_tc_list.size; i++) {
for (size_t i = 0; i < db_tc_list.size; i++) {
if (db_tc_list.list[i].tc_identify == username) {
db_tc_list.removeFromList(i);
return 1;
+8 -8
View File
@@ -476,7 +476,7 @@ bool teacherProcess(Teacher& tc, UserList& user_list, StudentCourseList& db_st_c
#pragma region Tien
void to_upper(string &s) {
for (int i = 0; i < s.length(); i++) {
for (size_t i = 0; i < s.length(); i++) {
s[i] = toupper(s[i]);
}
}
@@ -562,7 +562,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
else if (agvList.list[0] == "ss") {
if (agvList.size > 1) {
agvList.removeFromList(0);
for (int i = 0; i < agvList.size; i++) {
for (size_t i = 0; i < agvList.size; i++) {
to_upper(agvList.list[i]);
}
StudentList sList = db_st_list.findStudentByNameKeyWord(agvList.list, agvList.size);
@@ -606,7 +606,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
else if (agvList.list[0] == "st") {
if (agvList.size > 1) {
agvList.removeFromList(0);
for (int i = 0; i < agvList.size; i++) {
for (size_t i = 0; i < agvList.size; i++) {
to_upper(agvList.list[i]);
}
TeacherList tList = db_tc_list.findTeacherByNameKeyword(agvList.list, agvList.size);
@@ -664,7 +664,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
else removeList.addToList(username);
} while (true);
arrayList<string> remove_unsuccess;
for (int i = 1; i < removeList.size; i++) {
for (size_t i = 1; i < removeList.size; i++) {
if (ad.removeUser(removeList.list[i], user_list, db_st_list, db_tc_list) == 1) {
}
@@ -677,7 +677,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
}
else {
cout << "Some user remove unsuccessful! That is:" << endl;
for (int j = 0; j < remove_unsuccess.size; j++) {
for (size_t j = 0; j < remove_unsuccess.size; j++) {
cout << j + 1 << ".\t" << remove_unsuccess.list[j] << endl;
}
cout << "Other user remove successful!" << endl;
@@ -687,7 +687,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
else
{
arrayList<string> remove_unsuccess;
for (int i = 1; i < agvList.size; i++) {
for (size_t i = 1; i < agvList.size; i++) {
if (ad.removeUser(agvList.list[i], user_list, db_st_list, db_tc_list) == 1) {
}
@@ -700,7 +700,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
}
else {
cout << "Some user remove unsuccessful! That is:" << endl;
for (int j = 0; j < remove_unsuccess.size; j++) {
for (size_t j = 0; j < remove_unsuccess.size; j++) {
cout << j + 1 << ".\t" << remove_unsuccess.list[j] << endl;
}
cout << "Other user remove successful!" << endl;
@@ -723,7 +723,7 @@ bool adminProcess(Admin& ad, UserList& user_list, StudentList& db_st_list, Teach
cout << setw(40) << setfill(' ') << left << "Add Student" << "[as]" << endl;
cout << "Input <as> then input student's informations." << endl << endl;
cout << setw(40) << setfill(' ') << left << "Remove User" << "[ru]" << endl;
cout << "Input <ru> then input list of usernames. Or input <ru> <list of username you want to remove (separate by space)." << endl << endl;
cout << "Input <ru> then input list of usernames. Or input <ru> <list of username you want to remove (separate by space)>." << endl << endl;
cout << setw(40) << setfill(' ') << left << "Search Teacher by name" << "[st]" << endl;
cout << "Input <st> <list of teachers' name> to search. Or input <st> then input <name>." << endl;
cout << "Input as this format <identify, name, birthday, \"phone number\", \"hometown\"> (separate by comma):" << endl << endl;
+1 -1
View File
@@ -78,4 +78,4 @@ S0997,S0997,teacher
S0998,S0998,teacher
S0999,S0999,teacher
S1000,S1000,teacher
admin,a,admin
admin,a,admin
1 1712350 123456 student
78 S0998 S0998 teacher
79 S0999 S0999 teacher
80 S1000 S1000 teacher
81 admin a admin