Re: help a beginner : code not working



You need to turn up warnings and run the result only when you either
get no messages at all or when you understand that the message is
genuinely simply some advice.

One question : under gcc, can i get more meaningfull error message?
What would be the command ? :
gcc parlst3L.c -o -w -pedantic parlst3L
Gcc return "parlst3L : No such file or directory

(you meant to write: 'gcc parlst3L.c -o parlst3L -w -pedantic' -- the
output file name goes after the -o)

I'd use:

 gcc -std=c89 -pedantic -Wall -Wextra

There are a bunch of other helpful warnings you can turn on.  I almost
always use:

 -Wstrict-prototypes -Wbad-function-cast -Wcast-qual -Wshadow -Wundef
 -Wconversion -Wwrite-strings

as well.  (This last one makes gcc non-conforming is very subtle cases
but it useful enough that I don't care.)

<<<< Thanks

It is a minor point, but using odd layout discourages experienced
people from reading the code.  It just looks too messy.  At least,
that is my first reaction to it.  You can be a clever maverick in your
algorithms, but you should be conforming sheep in your layout.

<<<< OOps, Read it after my last posting

--
Ben.

.



Relevant Pages

  • RE: Windows Service Pack 2 Error
    ... advice concerning the Hard drive space, which I didn't know about from you. ... download SP2 again, and it STOPPED AGAIN 3/4 of the way through! ... Open a Run command and type in: ... regsvr32 wuweb.dll ...
    (microsoft.public.windowsxp.perform_maintain)
  • Process header record and concatenate files
    ... Concatenate the input files into a single output file. ... records reported in the header, ... Specify the list of input files on the command line. ... rewind to beginning of file handle and concat to ...
    (comp.lang.perl.misc)
  • Re: SP4 wont install because of dbghelp.dll
    ... >Verify that e.g. Administrator and SYSTEM have full ... >access rights, ... I did the "cacls" advice you gave resulted in me receiving ... Not enough storage is available to process this command. ...
    (microsoft.public.win2000.general)
  • RE: Sending a plain-text message from a post form
    ... I did sucessfully send the form following your advice. ... Sue Mosher, Outlook MVP ... I am trying to mimic your example of a repair request from ... I'm having trouble with the "Send as Text" command button. ...
    (microsoft.public.outlook.program_forms)
  • Re: Process header record and concatenate files
    ... Concatenate the input files into a single output file. ... records reported in the header, ... Specify the list of input files on the command line. ... rewind to beginning of file handle and concat to ...
    (comp.lang.perl.misc)

Loading