Delete Student
1. delete_from_database() function
delete_from_database() function1.1 Description:
1.2 Syntax:
Short Form:
// Routine
bool delete_from_database(char* nom, char* prenom);
// Function call
bool result = delete_from_database("Smith", "John");Full Form:
bool delete_from_database(char* nom, char* prenom) {
char option1[100];
char option2[100];
int response;
sprintf(option1, "database/%s_%s.txt", nom, prenom);
sprintf(option2, "database/%s_%s.txt", prenom, nom);
if(remove(option1) == -1)
if(remove(option2) == -1)
return false;
return true;
}1.3 Parameters:
Argument
Description
1.5 Return Value:
1.6 Usage:
2. deleteStudent() function:
deleteStudent() function:2.1 Description:
2.2 Syntax:
Short Form:
Full Form:
2.3 Function Tasks:
Last updated