Mail Archives: djgpp/1997/06/25/04:01:38
On Sun, 22 Jun 1997 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)
Please make a good-faith effort to at least ask questions correctly.
``something is wrong with my second function''? Come on, you should
know better than that! Effectively, what you tell us is this: Here's
my code; why won't you guys copy it to your development machine, try
to compile it, see the error messages, search the docs to find out
what's wrong, correct whatever needs to be corrected, recompile to
verify you're getting your stuff right, then tell my poor newbie soul
what to do."
This is NOT a free hotline. Please do not forget this and include in
your questions any information you can possibly give us to make our
job helping you as easy as it can get. It is hard enough to
second-guess problems of others from the other side of the world even
if you do report all the relevant info. Please don't make it harder
by posting incomplete information.
> return (s(s - a)(s - b)(s - c));
^^^^^^^^^^^^^^^^^^^^^^
This is C, not an algebraic expression evaluator. C doesn't
understand such syntax, you need to use the multiplication operator
explicitly:
return s*(s - a)*(s - b)*(s - c);
- Raw text -