Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/line_split.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
#ifndef __LINE_SPLIT_HPP
#define __LINE_SPLIT_HPP

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <sstream>
#include <fstream>
Expand Down Expand Up @@ -70,7 +70,7 @@ class LineSplit {
char *lpc_selectColumns;
uintidx luintidx_limInf;
uintidx luintidx_limSup;
char ls_selectColumns[ aistr_selectColumns.length() + 2];
char* ls_selectColumns = new char[aistr_selectColumns.length() + 2]; // to fix error at compile time

using namespace std;
istringstream liss_stringstream;
Expand Down Expand Up @@ -103,6 +103,7 @@ class LineSplit {
lpc_readItem = strtok(NULL, ",");
}
} /*IF !NULL*/
delete[] ls_selectColumns; // to liberate memory
}

uintidx split(std::string& str)
Expand Down