C++ Structure exercise: Student Records Management program
Step 4: Defining the search(struct student st, strng id, int itemcount) method to search for the index of a target record. This method is useful as we need it to find the location of the target record in the array of student objects. It can help us to make sure the record does exit before we allow the record for deletion or updating. If the target element is found, the method returns the index of this element. It return -1, if the target element is not found in the array.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: