From c0e836441eeb2b7e2a6ca5d50fa226d679d19c04 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 6 Mar 2007 16:08:44 +0000 Subject: [PATCH] replace printf with osstream --- .../test/Stream_lines_2/Stream_line.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Stream_lines_2/test/Stream_lines_2/Stream_line.cpp b/Stream_lines_2/test/Stream_lines_2/Stream_line.cpp index bbff2abc324..2a577cfe085 100644 --- a/Stream_lines_2/test/Stream_lines_2/Stream_line.cpp +++ b/Stream_lines_2/test/Stream_lines_2/Stream_line.cpp @@ -1,16 +1,14 @@ -#include -#include -#include - #include #include - #include #include #include #include #include +#include +#include + typedef double coord_type; typedef CGAL::Cartesian CK; typedef CGAL::Filtered_kernel K; @@ -38,9 +36,11 @@ int main() { for (int i=1;i<=23;i++) { - char file_name[80]; - std::sprintf(file_name, "data/%d.vec.cin", i); - std::ifstream infile(file_name, std::ios::in); + std::ostringstream os; + os << "data/" << i << ".vec.cin"; + std::string file_name = os.str(); + + std::ifstream infile(file_name.c_str(), std::ios::in); double iXSize, iYSize; unsigned int x_samples, y_samples; iXSize = iYSize = 512;