Skip to content

Commit ea2cbd7

Browse files
committed
Explicitly include required header
1 parent e5733c4 commit ea2cbd7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ql/time/ecb.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
#include <boost/bimap/set_of.hpp>
2727
#include <algorithm>
2828
#include <string>
29-
#include <stdio.h>
29+
#include <cstdio>
30+
#include <cctype>
3031

3132
using std::string;
3233

@@ -212,7 +213,7 @@ namespace QuantLib {
212213

213214
// c-style string. length: 6 == (3 for month + 2 for year + 1 for terminating null)
214215
char ECBcode[6];
215-
snprintf(ECBcode, 6, "%3s%02d", month.data(), y);
216+
std::snprintf(ECBcode, 6, "%3s%02d", month.data(), y);
216217

217218
#if defined(QL_EXTRA_SAFETY_CHECKS)
218219
QL_ENSURE(isECBcode(ECBcode),

0 commit comments

Comments
 (0)