Re: Simplicity has a future



Ian Collins said:

Richard Heathfield wrote:
Ian Collins said:

#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

It shouldn't do. The char arr[3] = "123"; way of initialising an array of
characters, without null-terminating it, is a well-known C idiom.

and carry on checking my C code with my C++ compiler.

That approach is likely to bite you one day, if it hasn't silently done so
already.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



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: Simplicity has a future
    ... Richard Heathfield wrote: ... int main ... arbitrary errors into your copy of the code, that's up to you, but the ... Ian Collins. ...
    (comp.lang.c)
  • Re: trying to assign function pointers
    ... Ian Collins said: ... int = increasing; ... qsort, compar); ... rjh at the above domain, ...
    (comp.lang.c)