Re: Simplicity has a future



Richard Heathfield wrote:
Ian Collins said:


Richard Heathfield wrote:

Read the code more carefully. I think you jumped to a false conclusion.


OK, it may be legal C, but it ain't pretty.

#include <stdio.h>

int main(void)
{
char title__of__the__program[81] =
"C to C++ Translation\nONLY extra casts and renaming"
" of variables are allowed.\n\n\n\n\n";

printf( "%s\n", title__of__the__program );


But my code very definitely did not do that. If you want to introduce
arbitrary errors into your copy of the code, that's up to you, but the
error was not present in /my/ code.

It might not be in your code, but the very fact that the code is legal C
makes me cringe and carry on checking my C code with my C++ compiler.

--
Ian Collins.
.



Relevant Pages

  • Re: Simplicity has a future
    ... Ian Collins said: ... int main ... arbitrary errors into your copy of the code, that's up to you, but the ... rjh at above domain ...
    (comp.lang.c)
  • Re: K&R Ex 1-3
    ... Richard Heathfield wrote: ... make that int main. ... While you are there, turn your compiler's warnings up, the above ... Ian Collins. ...
    (comp.lang.c)
  • Re: Simplicity has a future
    ... Ian Collins said: ... int main ... arbitrary errors into your copy of the code, that's up to you, but the ... rjh at above domain ...
    (comp.lang.c)
  • Re: K&R Ex 1-3
    ... Richard Heathfield wrote: ... Look, if your point is that the int mainform is *preferable*, I ... I use that form myself and recommend it to others. ... Ian Collins. ...
    (comp.lang.c)
  • Re: trying to assign function pointers
    ... Richard Heathfield wrote: ... int = increasing; ... qsort, compar); ... Ian Collins. ...
    (comp.lang.c)