diff -r 31ee6af0337781b170615396163f95b5dc04d04c -r 9d9ea90c82c8a161436b9ee45897a27c91f1c318 include/csvpp.h --- a/include/csvpp.h Tue Mar 25 22:36:27 2014 -0500 +++ b/include/csvpp.h Tue Mar 25 22:50:20 2014 -0500 @@ -24,7 +24,7 @@ // Adding support for custom delimiter character // Based on the patch by Hanifa // https://code.google.com/p/csvpp/issues/detail?id=2 - RowReader(std::string delimiter_char = ",", bool skipheader=false,const char * newline="\n") : skipheader(skipheader), newline(newline) { } + RowReader(std::string delimiter_char = ",", bool skipheader=false,const char * newline="\n") : delimiter_char(delimiter_char), skipheader(skipheader), newline(newline) { } void clear() { header.clear(); } friend std::istream & operator>>(std::istream & os, RowReader & r); friend std::ostream & operator<<(std::ostream & os, const RowWriter & r); diff -r 31ee6af0337781b170615396163f95b5dc04d04c -r 9d9ea90c82c8a161436b9ee45897a27c91f1c318 tests.cpp --- a/tests.cpp Tue Mar 25 22:36:27 2014 -0500 +++ b/tests.cpp Tue Mar 25 22:50:20 2014 -0500 @@ -8,7 +8,7 @@ int test = 1; // Test 1 { - RowReader tmp; + RowReader tmp(","); stringstream ss; ss << "field1,field2,field3\r\n123,234,345\r\n999,000,111\r\n"; ss >> tmp; @@ -21,7 +21,7 @@ case 0: if (tmp["field1"] != "123") { - cout << tmp["field1"] << endl; + cerr << tmp["field1"] << endl; cerr << "Failed at row " << row << endl; cerr << "Failed at test " << test << endl; return 1; @@ -30,6 +30,7 @@ case 1: if (tmp["field1"] != "999") { + cerr << tmp["field1"] << endl; cerr << "Failed at row " << row << endl; cerr << "Failed at test " << test << endl; return 1; @@ -56,7 +57,7 @@ case 0: if (tmp["field1"] != "123") { - cout << tmp["field1"] << endl; + cerr << tmp["field1"] << endl; cerr << "Failed at row " << row << endl; cerr << "Failed at test " << test << endl; return 1; @@ -65,6 +66,7 @@ case 1: if (tmp["field1"] != "999") { + cerr << tmp["field1"] << endl; cerr << "Failed at row " << row << endl; cerr << "Failed at test " << test << endl; return 1; @@ -94,7 +96,7 @@ case 0: if (tmp["field1"] != "123") { - cout << tmp["field1"] << endl; + cerr << tmp["field1"] << endl; cerr << "Failed at row " << row << endl; cerr << "Failed at test " << test << endl; return 1; @@ -103,6 +105,7 @@ case 1: if (tmp["field1"] != "999") { + cerr << tmp["field1"] << endl; cerr << "Failed at row " << row << endl; cerr << "Failed at test " << test << endl; return 1;