Re: sprintf equivalent in c++
[snipped conversation re. C <file.hvs. C++ <cfileheaders .]
James Kanze wrote:
>
Are you sure that none of the symbols that aren't allowed to be
in :: weren't.
The symbols to which you're referring are allowed to be there, and have
been allowed for a long time. At least cstdlib gives me the choice
between ::size_t and std::size_t.
I use POSIX quite a bit, and haven't had any problems with it (aside
from the non-C++-specific friction, e.g. re. dlsym returning void*).
Platform-specific names (e.g. ::ssize_t) are no less plentiful in
stdlib.h than in cstdlib.
In my admittedly anecdotal experience, it *is* vanishingly rare, and
*does* correlate strongly with the quality of the programmer's work in
other respects; I apparently hold the minority opinion in c.l.c++,
though. I guess we'll agree to disagree.
[snipped conversation re. C <file.hvs. C++ <cfileheaders .]
James Kanze wrote:
On Oct 15, 5:20 pm, Jeff Schwab <j...@schwabcen ter.comwrote:
>And where on earth are you still having trouble with <c*>?
> They've worked well for me for at least the last years or so
>(using mostly GCC).
> They've worked well for me for at least the last years or so
>(using mostly GCC).
Are you sure that none of the symbols that aren't allowed to be
in :: weren't.
been allowed for a long time. At least cstdlib gives me the choice
between ::size_t and std::size_t.
For those of us who work under Posix, or have to support Posix,
there's an additional issue---Posix modifies the definition of
some of the standard C headers. And who knows whether the
<c...headers will respect the Posix standard; there isn't a
Posix standard for the <c...headers.
there's an additional issue---Posix modifies the definition of
some of the standard C headers. And who knows whether the
<c...headers will respect the Posix standard; there isn't a
Posix standard for the <c...headers.
from the non-C++-specific friction, e.g. re. dlsym returning void*).
Platform-specific names (e.g. ::ssize_t) are no less plentiful in
stdlib.h than in cstdlib.
The result is that most competent programmers I know prefer the
older, C compatible forms. Not all; there are valid arguments
both ways. But it's certainly not "vanishingl y rare, and
generally a sign of incompetence."
older, C compatible forms. Not all; there are valid arguments
both ways. But it's certainly not "vanishingl y rare, and
generally a sign of incompetence."
*does* correlate strongly with the quality of the programmer's work in
other respects; I apparently hold the minority opinion in c.l.c++,
though. I guess we'll agree to disagree.
Comment