I haven't had the chance to look through this code in detail, but two things immediately strike me:
- The use of
<conio.h>
. This is a non-standard library which is specific to certain ancient MS-DOS and Windows compilers, and won't be supported by any modern compiler library. - The declaration of
main()
as avoid
function. This is entirely non-standard, and should be avoided - while older compilers sometimes allowed it, and the older versions of the standard permitted it, modern compilers will invariably catch it as an error.
In addition, the indentation is seriously messed up, though that could be the result of pasting the code into the post.