On Tue, 02 Dec 2003 04:58:12 GMT, "Francesco Gallarotti"
<> wrote in comp.lang.c++:
> Reading some code today I saw this:
>
> static int
> CreateCompress(cinfo, version, size)
> j_compress_ptr cinfo;
> int version;
> size_t size;
> {
> jpeg_create_compress(cinfo);
> return TCL_OK;
> }
This code is not C++, it is pre-standard C. No C++ compiler should
accept it.
> Is this 100% equivalent to:
>
> static int CreateCompress(j_compress_ptr cinfo, int version, size_t size) {
> jpeg_create_compress(cinfo);
> return TCL_OK;
> }
In C, the operation of the function is the same. But it is not 100%
equivalent in that the first form does not create a prototype.
> Have you ever seen that kind of syntax before? This was my first time...
>
> Francesco Gallarotti
Sure, see the C Programming Language, first edition, not the second.
And most books about C written prior to 1990, and sadly too many
written afterwards. But it's nothing to do with C++.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq>