Lets follow the logic here a minute:
for(i = 0; i < 500; i++)
szEdit[i] = new char;
- Whats the outer while loop for?
while not EOF
Loop i from 0 to 499
szEdit[i] = new memory size(256)
get one line in buffer
Copy buffer to szEdit /* Oops, out of bounds */
- Note the out of bounds comment.
It looks like you created a recursive problem here. Instead of calling menu(), did you mean to return instead?
printf("Error, Returning to main menu");