* Chris Gray ([EMAIL PROTECTED]) wrote:
> This is not. (Using "should" in the sense that it must be this way to
> compile, not be this way to be stylistically correct). It is just
> confusing to everyone else who reads his program to have it the way
> that Mark has it. Traditionally, argc stands
also sprach Xucaen (on Tue, 06 Mar 2001 10:36:15AM -0800):
> > int main(int foo, char **bar, char **baz)
> to be honest, I haven't seen this last one. how
> does it work?
the third argument is a pointer to a sequence of pointers to
environment var=val pairs, terminated by a null pointer.
martin
--- Chris Gray <[EMAIL PROTECTED]> wrote:
> vector". But they are just arguments to a
> function and can have any
> name a person wants. So all the following are
> correct:
>
> int main(void)
> int main(int foo, char **bar)
> int main(int foo, char **bar, char **baz)
>
to be honest, I haven't s
On Mon, 05 Mar 2001, Juan Fuentes wrote:
> * Mark Phillips ([EMAIL PROTECTED]) wrote:
>>
>> int main(int argv, char **argc){
>
> Mark you need to link to math library:
>
> gcc -g thick.c -lm -o thick
This is (of course) correct.
> And main should be:
>
> int main(int argc, char **argv);
This
I think I will forget this for a while myself.
also, when using ncurses.h, you need to compile
with -lncurses .
xucaen
--- Mark Phillips <[EMAIL PROTECTED]>
wrote:
> I've just solved my own problem. Of course I
> needed to do
>
> $ gcc thick.c -lm
>
> It's been a while since I've used C. S
* On 05-03-01 at 16:21 Bostjan Muller ([EMAIL PROTECTED]) wrote:
+Here quoted text begins+
[...]
+and here the quote ends+
Wow I was far off... hmm shows I'm still on day five of C in 21 days ;)
B.
--
Boštjan Müller [NEONATUS], [EMAIL PROTECTED], http://neonatus.net/~neonatus
Fo
* Mark Phillips ([EMAIL PROTECTED]) wrote:
> Hi,
>
> The following program:
>
>
> #include
> #include
>
> int main(int argv, char **argc){
> double x;
>
> x=sqrt(5.0);
> }
>
>
> does not compile. Instead I get the errors:
>
> $ gcc thick.c
> /tmp/ccU9fgSr.o: In function `main':
> /tm
* On 05-03-01 at 15:23 Mark Phillips ([EMAIL PROTECTED]) wrote:
+Here quoted text begins+
> Hi,
>
> The following program:
>
>
> #include
> #include
>
> int main(int argv, char **argc){
> double x;
>
> x=sqrt(5.0);
> }
>
>
> does not compile. Instead I get the errors:
>
> $ g
Mark Phillips <[EMAIL PROTECTED]> writes:
> Hi,
>
> The following program:
>
>
> #include
> #include
>
> int main(int argv, char **argc){
> double x;
>
> x=sqrt(5.0);
> }
>
>
> does not compile. Instead I get the errors:
>
> $ gcc thick.c
> /tmp/ccU9fgSr.o: In function `main':
> /tm
Mark Phillips wrote:
>
> Hi,
>
> The following program:
>
> #include
> #include
>
> int main(int argv, char **argc){
> double x;
>
> x=sqrt(5.0);
> }
>
> does not compile. Instead I get the errors:
>
> $ gcc thick.c
> /tmp/ccU9fgSr.o: In function `main':
> /tmp/ccU9fgSr.o(.text+0x16):
On Tue, Mar 06, 2001 at 12:26:30AM +1030, Mark Phillips wrote:
> Hi,
>
> The following program:
>
>
> #include
> #include
>
> int main(int argv, char **argc){
> double x;
>
> x=sqrt(5.0);
> }
>
>
> does not compile. Instead I get the errors:
>
> $ gcc thick.c
> /tmp/ccU9fgSr.o: In fu
Mark Phillips wrote:
>Hi,
>
>The following program:
>
>
>#include
>#include
>
>int main(int argv, char **argc){
> double x;
>
> x=sqrt(5.0);
>}
>
>
>does not compile. Instead I get the errors:
>
>$ gcc thick.c
>/tmp/ccU9fgSr.o: In function `main':
>/tmp/
On Tue, Mar 06, 2001 at 12:26:30AM +1030, Mark Phillips wrote:
> Hi,
> does not compile. Instead I get the errors:
>
> $ gcc thick.c
> /tmp/ccU9fgSr.o: In function `main':
> /tmp/ccU9fgSr.o(.text+0x16): undefined reference to `sqrt'
> collect2: ld returned 1 exit status
>
>
> What is wrong?
y
I've just solved my own problem. Of course I needed to do
$ gcc thick.c -lm
It's been a while since I've used C. Sorry for the silly question.
Cheers,
Mark.
Mark Phillips [EMAIL PROTECTED] wrote:
> Hi,
>
> The following program:
>
>
> #include
> #include
>
> int main(int argv, char **
14 matches
Mail list logo