From 3f3122bf224c4c9bc3bed303fb3e5218764f9317 Mon Sep 17 00:00:00 2001 From: davila Date: Wed, 18 Feb 2015 18:36:11 +0100 Subject: [PATCH] skip lines --- packages/std/src/bbstdReadColumnsString.cxx | 9 ++++++++- packages/std/src/bbstdReadColumnsString.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/std/src/bbstdReadColumnsString.cxx b/packages/std/src/bbstdReadColumnsString.cxx index 6d9cfe5..afcd636 100644 --- a/packages/std/src/bbstdReadColumnsString.cxx +++ b/packages/std/src/bbstdReadColumnsString.cxx @@ -55,12 +55,18 @@ void ReadColumnsString::Process() tlst.push_back( new std::vector ); } + int iSkipLines; int numberOfLines = 0; - char tmpValue[50]; + char tmpValue[500]; std::vector *vecData; FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" ); if (ff1!=NULL) { + for (iSkipLines=0;iSkipLines ); @@ -72,6 +73,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReadColumnsString,bbtk::AtomicBlackBox); BBTK_DESCRIPTION("Read Columns from a text file"); BBTK_CATEGORY("read/write"); BBTK_INPUT(ReadColumnsString,FileName,"File name of Points",std::string,""); + BBTK_INPUT(ReadColumnsString,SkipLines,"(default 0) - Number of lines to be skipe before read data",int,""); BBTK_INPUT(ReadColumnsString,Dimension,"(default 1) - The number of columns of the file",int,""); BBTK_OUTPUT(ReadColumnsString,lstData1,"vector of data",std::vector,""); -- 2.47.1