🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1381

Re: sprintf return value

#1381
From: Steve Clamage
Date: Thu, 28 Jan 1993 19:07
17 lines
902 bytes
mharriso@digi.lonestar.org (Mark Harrison) writes:

>Will the C++ standard specify the return type of sprintf()?

Yes.  The C++ Standard will incorporate the library portion of the
ANSI/ISO C standard (with some minor modifications):

	int sprintf(char* buf, const char* fmt, ...);

It returns the number of characters stored in buf, like the rest of
the printf family.

Some C libraries have sprintf return buf (a char*), for reasons I
have never understood.  This is neither standard C nor standard C++.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Technical Details
Message-ID: <1993Jan28.190759.28006@taumet.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!taumet!steve
References: <1993Jan26.202158.21195@digi.lonestar.org>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!taumet!steve
From: steve@taumet.com (Steve Clamage)
Subject: Re: sprintf return value
Message-ID: <1993Jan28.190759.28006@taumet.com>
Organization: TauMetric Corporation
References: <1993Jan26.202158.21195@digi.lonestar.org>
Date: Thu, 28 Jan 1993 19:07:59 GMT
Lines: 17