delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/26/19:47:34

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: My second function doesn't work (stupid newbie question)
Date: Sun, 22 Jun 1997 09:28:23 -0400
Organization: Cornell University
Lines: 29
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <33AD2877.4C8B3E95@cornell.edu>
References: <33ac9f87 DOT 20873600 AT news DOT mindspring DOT com>
NNTP-Posting-Host: cu-dialup-0092.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

dabrownz AT mindspring DOT com wrote:
> 
> DJGPP keeps telling me that there is something wrong with my second
> function.  I don't see why.  Please help, I'm a stupid newbie and I'll
> appriciate any help (the answer is probably right under my nose)
> 

nothing justifies:

> float main()
> {

the _ONLY_ acceptable return type for main is int. 

> float computeHero(float a, float b, float c, float s)
> {
>    return (s(s - a)(s - b)(s - c));
> }

did you mean s*(s-a)*(s-b)*(s-c) ?

i would recommend you post this kind of stuff to comp.lang.c where it
will get properly flamed.

-- 
----------------------------------------------------
A. Sinan Unur
mailto:asu1 AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1

- Raw text -


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