www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/11/10/09:33:33

From: Brian Hechinger <wonko AT fubar DOT bk DOT psu DOT edu>
Subject: two questions
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Wed, 10 Nov 93 8:55:04 EST

my first question is this.  i have a copy of go32 1.08
if i accidentally type "go32 file.c" or any non-gcc executable
file it locks my computer up.  i understnad why this happens i am
just wondering if in any of the newer version it terminates instead
of crashing.

second guestion.  when writing c++ code, i have to make main an int not
a void and return needs a value, what is the reason behind this??
from what i remember about my c++ class i had god knows how long ago
we could do this:

void main()
{
   program lines
   return;
}

but when i tried this with djgpp it forced me to do it this way:

int main()
{
   program lines
   return 0;
}

just curious as to why this is.  thanks.

-wonko

--------------------------------------------------------------------
Wonko the Sane/KLF          aka:                     Brian Hechinger
wonko AT fubar DOT bk DOT psu DOT edu                          blh115 AT psuvm DOT psu DOT edu 

                 PGP key available upon request
--------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019