insert insert takes 5 arguments, representing the individual attributes in the o
ID: 440170 • Letter: I
Question
insert insert takes 5 arguments, representing the individual attributes in the order (command, firstname, lastname, id, academic class, major. Store the new student in the next available array spot. If a student id already exists, print out an error message starting with "Error!" Then repeat the prompt. You can assume that there are no spaces within the attribute values specified by the user. class> add amy smith 10 junior music class> add ronald ray 779 Junior math class> add mini mouse 66 senior account class>Explanation / Answer
/*you need more information than given to this prompt correctly. assumptions: -student is a structure of public access firstname,lastname,id,academic_class, major -you have a student array of MAXSIZE size and filled to Counter students */ student arr[MAXSIZE]; int Counter= 0; void insert(string command, string firstname, string lastname,int id,string academic_class, string major){ for(int i=0;iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.