This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: snprintf() with g++ -std=c++98: error: 'snprintf' was not declared in this scope
- From: Ryan Johnson <ryan dot johnson at cs dot utoronto dot ca>
- To: cygwin at cygwin dot com
- Date: Wed, 04 Apr 2012 10:02:24 -0400
- Subject: Re: snprintf() with g++ -std=c++98: error: 'snprintf' was not declared in this scope
- References: <20120404133244.GA2056@qp9482>
On 04/04/2012 9:32 AM, Denis Excoffier wrote:
Hello,
It could be that snprintf() is not properly declared in<stdio.h>.
According to [1], it's not officially part of c++98 (???). Try gnu++98
instead. As for why it's not in c++0x, there's a problem with the macros
being defined [2] that AFAIK remains unresolved; again the workaround is
gnu++0x.
[1] http://cygwin.com/ml/cygwin/2010-01/msg00791.html
[2] http://cygwin.com/ml/cygwin/2011-08/msg00311.html
Regards,
Ryan
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple