I'm not going to write the complete edit function for you. But you already have most of the parts because editing can be implemented by selecting, reading, entering new data, deleting the old record, and inserting the edited data.
Quote:
Also it does not going back to main menu after adding a record.
Never call main() from within your code as done here in the record() function:
if (choice2=='n'||choice2=='N')
{
system("cls");
main();
}
Just return from the function (simply delete the above code block). Then execution continues after the function call in main(). Similar for the other functions where you call main() too. To process the next operation you have to implement a loop in main() that gets and processes the next choice until the exit option is selected:
do
{
printf("\nEnter your Choice here \t");
scanf("%i",&choice);
fflush(stdin);
switch (choice)
{
// ...
}
system("cls");
} while (choice != 5);
Note also that this the wrong forum because this is about Managed C++/CLI as stated in the topmost (sticky) post. Please use the C / C++ / MFC Discussion Boards[^] or Ask a Question for further C/C++ related questions where the latter is the better choice when posting larger amounts of code (which should be avoided).