Your first of many problems lies here:
void main ()
Main must return int
. Some compilers may let you get away with void
, but that is non-standard.
int main() { ... }
Or
int main(int argc, char** argv) { ... }
are the 2 standard signatures for main
.