Home > Archive > C > February 2006 > Re: need to compile this ( trying to find roots of a bisection)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: need to compile this ( trying to find roots of a bisection)
|
|
| Ronaldão 2006-02-26, 7:55 am |
| As far as I could see, you may be using borland C or similar compiler
for DOS or windows environments because of the conio.h header file.
Your code will not compile because of some "If" and "Else" statemens.
You can't use capital letters on them. About your main function, there
is nothing wrong with it. It can have one of the forms:
void main(void)
int main(void)
int main(int argc, char **argv)
int main(int argc, char *argv[])
and some extensions supports the form
int main(int argc, char **argv, char **envp)
Next time you post something here, try to be more explicit about the
problems you are going through.
| |
| CBFalconer 2006-02-26, 7:55 am |
| Ronaldão wrote:
>
> As far as I could see, you may be using borland C or similar
> compiler for DOS or windows environments because of the conio.h
> header file.
>
> Your code will not compile because of some "If" and "Else"
> statemens. You can't use capital letters on them. About your main
> function, there is nothing wrong with it. It can have one of the
> forms:
>
> void main(void)
No, this is not allowed. main always returns int.
> int main(void)
> int main(int argc, char **argv)
> int main(int argc, char *argv[])
> and some extensions supports the form
> int main(int argc, char **argv, char **envp)
This is not specified in the C standard. Do not assume it. See
the standard routines getenv and putenv.
>
> Next time you post something here, try to be more explicit about
> the problems you are going through.
The next time you post here try to be more accurate in your
answers.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
| |
| Jordan Abel 2006-02-26, 6:55 pm |
| On 2006-02-26, CBFalconer <cbfalconer@yahoo.com> wrote:
> Ronaldão wrote:
>
> This is not specified in the C standard. Do not assume it. See
> the standard routines getenv and putenv.
putenv is only _barely_ more standard [in that it's defined in _a_
standard] than envp, and isn't likely to be supported on any
implementations where envp is not. He _did_ say it was an extension.
|
|
|
|
|