need C help, passing char buffer[] by-value....

Polytropon freebsd at edvax.de
Mon Oct 19 03:46:23 UTC 2009


On Sun, 18 Oct 2009 23:30:49 -0400, Robert Huff <roberthuff at rcn.com> wrote:
> 
> Glen Barber writes:
> 
> >  >> // redo, skip TAGS
> >  >
> >  > Is this C or C++ source code? I always thought // was C++
> >  > specific...
> >  >
> >  
> >  "//" comments are recognized by both C and C++.
> 
> 	How about "... are recognized by both C++ and more recent versions
> of C."?

That's what I thought. In fact, I *had* C programs containing
the // comments, but they failed to compile. After changing
the // to /* ... */ it worked. Maybe that's not an issue anymore,
but I've been told by a long-time C programmer that // should
be kept out of C code for maximum compatibility.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list