Hi everyone,

When I try the code below with data in a txt file, I have no problems and the data prints properly and neatly on the screen. (Note, one slight modification when using a txt file, instead of getline (ist, ignored, ','), I do getline (ist, ignored, '/t') to ignore tabs since the txt file is tab delimited )

But when I try the code below on a csv file, it ends up printing a jumbled mess and keeps on in a never ending loop, even though the data is limited to a few days worth of data.

I tried uploading my csv file, but daniweb doesn't let me do that.

Thanks for any pointers,
TR

#include <stdafx.h>
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>

struct PriceInfo
{
	double       Open;
	double       High;
	double       Low;
	double       Close;
	unsigned int Volume;
	unsigned int Time;
	std::string  Date;
};

typedef std::vector<PriceInfo> PriceList;


std::istream& operator>>(std::istream& ist, PriceInfo& priceInfo)
{
	std::string ignored;
	std::string line;
	getline (ist, ignored, ',');
	getline (ist, ignored, ',');
	getline (ist, priceInfo.Date, ',');
	getline (ist, line);
	std::istringstream linestream(line);
	linestream >> priceInfo.Time >> priceInfo.Open >> priceInfo.High >> priceInfo.Low >> priceInfo.Close >> priceInfo.Volume;
	return ist;
}

std::ostream& WriteAmount(std::ostream& ostream,
                          double amount)
{
    ostream
        << std::setw(10) << std::right
        << std::fixed << std::setprecision(2)
        << amount;
    return ostream;
}

std::ostream& operator<<(std::ostream& ostream,
                         const PriceInfo& priceInfo)
{
    ostream << "| " << std::setw(10) << priceInfo.Date;
    WriteAmount(ostream, priceInfo.Time);
    WriteAmount(ostream, priceInfo.Open);
    WriteAmount(ostream, priceInfo.High);
    WriteAmount(ostream, priceInfo.Low);
    WriteAmount(ostream, priceInfo.Close);
	WriteAmount(ostream, priceInfo.Volume);
    ostream << " |";
    return ostream;
}

template <typename T>
std::istream& operator>>(std::istream& ist,
                         std::vector<T>& vector)
{
    std::copy(
        std::istream_iterator<T>(ist),
        std::istream_iterator<T>(),
        std::back_inserter(vector));
    return ist;
}

template <typename T>
std::ostream& operator<<(std::ostream& ostream,
                         const std::vector<T>& vector)
{
    std::copy(
        vector.begin(),
        vector.end(),
        std::ostream_iterator<T>(ostream, "\n"));
    return ostream;
}

void ReadPricesFromFile(const char* filename, std::vector<PriceInfo>& prices)
{
    std::ifstream input(filename);
    input >> prices;
}

void PrintPrices(std::ostream& output, const PriceList& prices)
{
	output << "| "
		<< std::setw(10) << "Date"   << " | "
		<< std::setw(6)  << "Time"   << " | "
		<< std::setw(6)  << "Volume" << " | "
		<< std::setw(8)  << "Open"   << " | "
		<< std::setw(8)  << "High"   << " | "
		<< std::setw(8)  << "Low"    << " | "
		<< std::setw(8)  << "Close"  << " |"
		<< std::endl     << prices;
}

int main(int argc, char* argv[])
{
    
		if (argc != 2)
	{
		std::cerr << "Usage: " << argv[0] << " filename " << std::endl;
		return EXIT_FAILURE;
	}

	
	PriceList prices;
    ReadPricesFromFile(argv[1], prices);
    PrintPrices(std::cout, prices);
    return EXIT_SUCCESS;
}

csv is a specialization of txt in that the text format is specific to comma separated fields with optional quoting rules for embedded commas. I'm guessing your code simply doesn't recognize the CSV format correctly. How about posting a small example of the CSV file?

Hi Narue, thanks for your response. As I mentioned in my OP, i tried to upload a small csv file but daniweb would not let me.... I can email it you however if you'd like?

attached the file, since the copy paste took a lot of space.

Wanted to point out that when i run my code on the csv file, I have no problems whatsoever. So what is confusing me is why i run into trouble with the csv file when its contents are what is in the attached txt file...

Attachments
NQ01MIR	1	12/10/2009	930	1794.25	1799.5	1794	1799	1873	1797.75
NQ01MIR	1	12/10/2009	931	1799	1801	1798.5	1800.5	1004	1799.25
NQ01MIR	1	12/10/2009	932	1800.75	1801	1800	1800.75	647	1799.5
NQ01MIR	1	12/10/2009	933	1800.75	1802	1800.5	1801.5	657	1800.25
NQ01MIR	1	12/10/2009	934	1801.75	1803.25	1801.75	1802	843	1800.75
NQ01MIR	1	12/10/2009	935	1802	1803.75	1801.25	1803.25	1084	1802
NQ01MIR	1	12/10/2009	936	1803.25	1806.75	1803.25	1806	1308	1804.75
NQ01MIR	1	12/10/2009	937	1806	1806	1804.5	1805	755	1803.75
NQ01MIR	1	12/10/2009	938	1805	1805.75	1803.75	1803.75	481	1802.5
NQ01MIR	1	12/10/2009	939	1803.75	1805.5	1803.25	1804	1038	1802.75
NQ01MIR	1	12/10/2009	940	1804	1805.5	1804	1805	1049	1803.75
NQ01MIR	1	12/10/2009	941	1805	1805	1804	1804.25	375	1803
NQ01MIR	1	12/10/2009	942	1804	1806.25	1803.75	1805.25	1323	1804
NQ01MIR	1	12/10/2009	943	1805.25	1805.75	1805.25	1805.5	375	1804.25
NQ01MIR	1	12/10/2009	944	1805.25	1805.5	1804.75	1805	511	1803.75
NQ01MIR	1	12/10/2009	945	1805	1805.75	1804.5	1804.5	871	1803.25
NQ01MIR	1	12/10/2009	946	1804.5	1805.5	1803.75	1804	1104	1802.75
NQ01MIR	1	12/10/2009	947	1804	1804.75	1803.75	1804.5	364	1803.25
NQ01MIR	1	12/10/2009	948	1804.75	1805.25	1803.75	1804	429	1802.75
NQ01MIR	1	12/10/2009	949	1804	1804.5	1803.75	1804	147	1802.75
NQ01MIR	1	12/10/2009	950	1804	1804	1802	1802.25	761	1801
NQ01MIR	1	12/10/2009	951	1802.5	1802.5	1801	1801	393	1799.75
NQ01MIR	1	12/10/2009	952	1801.25	1802	1800.5	1802	350	1800.75
NQ01MIR	1	12/10/2009	953	1802	1802	1799	1799.5	495	1798.25
NQ01MIR	1	12/10/2009	954	1799.5	1800.75	1799.25	1799.75	434	1798.5
NQ01MIR	1	12/10/2009	955	1800	1801.25	1800	1800.75	450	1799.5
NQ01MIR	1	12/10/2009	956	1800.75	1800.75	1799.75	1799.75	128	1798.5
NQ01MIR	1	12/10/2009	957	1799.5	1801	1799.5	1800.5	444	1799.25
NQ01MIR	1	12/10/2009	958	1800.5	1802	1800.5	1801.75	270	1800.5
NQ01MIR	1	12/10/2009	959	1801.75	1802.25	1799.75	1799.75	129	1798.5
NQ01MIR	1	12/10/2009	1000	1800	1800.75	1799.75	1800	270	1798.75
NQ01MIR	1	12/10/2009	1001	1800	1800	1799	1799.25	152	1798
NQ01MIR	1	12/10/2009	1002	1799.25	1799.25	1798.25	1798.25	167	1797
NQ01MIR	1	12/10/2009	1003	1798.25	1799.5	1797.5	1799.5	657	1798.25
NQ01MIR	1	12/10/2009	1004	1799.5	1799.5	1798.75	1799	312	1797.75
NQ01MIR	1	12/10/2009	1005	1799	1799.25	1797.5	1798	971	1796.75
NQ01MIR	1	12/10/2009	1006	1797.75	1798.5	1797.75	1798	293	1796.75
NQ01MIR	1	12/10/2009	1007	1798	1801.25	1797.75	1801	819	1799.75
NQ01MIR	1	12/10/2009	1008	1800.75	1801	1799.75	1800.5	373	1799.25
NQ01MIR	1	12/10/2009	1009	1800.75	1800.75	1800	1800.25	227	1799
NQ01MIR	1	12/10/2009	1010	1800.5	1801.5	1800.25	1801.25	431	1800
NQ01MIR	1	12/10/2009	1011	1801.25	1801.5	1800	1800.25	385	1799
NQ01MIR	1	12/10/2009	1012	1800	1800	1798.25	1798.25	353	1797
NQ01MIR	1	12/10/2009	1013	1798.5	1800.75	1798.5	1800.75	532	1799.5
NQ01MIR	1	12/10/2009	1014	1800.5	1800.75	1800	1800.25	212	1799
NQ01MIR	1	12/10/2009	1015	1800.25	1801.75	1800	1801.5	308	1800.25
NQ01MIR	1	12/10/2009	1016	1801.5	1802.25	1801.25	1802.25	618	1801
NQ01MIR	1	12/10/2009	1017	1802	1802.25	1800.75	1801.75	629	1800.5
NQ01MIR	1	12/10/2009	1018	1801.75	1801.75	1800.25	1800.25	235	1799
NQ01MIR	1	12/10/2009	1019	1800.25	1800.25	1799.5	1799.75	763	1798.5
NQ01MIR	1	12/10/2009	1020	1799.75	1800	1799.25	1800	1491	1798.75
NQ01MIR	1	12/10/2009	1021	1800.25	1800.75	1799.25	1800.25	302	1799
NQ01MIR	1	12/10/2009	1022	1800.25	1801.25	1800.25	1801.25	292	1800
NQ01MIR	1	12/10/2009	1023	1801.25	1802	1801	1801.75	188	1800.5
NQ01MIR	1	12/10/2009	1024	1801.75	1802.25	1801.75	1802.25	195	1801
NQ01MIR	1	12/10/2009	1025	1802	1802	1801	1801.5	451	1800.25
NQ01MIR	1	12/10/2009	1026	1801.75	1802.75	1801.75	1802.25	719	1801
NQ01MIR	1	12/10/2009	1027	1802.5	1804.75	1802.5	1804.75	534	1803.5
NQ01MIR	1	12/10/2009	1028	1804.75	1804.75	1803.5	1804	592	1802.75
NQ01MIR	1	12/10/2009	1029	1804	1804	1803	1803.25	298	1802
NQ01MIR	1	12/10/2009	1030	1803.25	1804.5	1802.5	1802.5	532	1801.25
NQ01MIR	1	12/10/2009	1031	1802.75	1804.5	1802.75	1803.25	731	1802
NQ01MIR	1	12/10/2009	1032	1803.25	1804	1803	1803	695	1801.75
NQ01MIR	1	12/10/2009	1033	1803.25	1804	1802.25	1802.5	744	1801.25
NQ01MIR	1	12/10/2009	1034	1802.75	1802.75	1802	1802.5	150	1801.25
NQ01MIR	1	12/10/2009	1035	1802.5	1802.75	1802	1802.25	152	1801
NQ01MIR	1	12/10/2009	1036	1802.25	1802.25	1801.25	1801.25	151	1800
NQ01MIR	1	12/10/2009	1037	1801.25	1801.75	1800.5	1800.75	247	1799.5
NQ01MIR	1	12/10/2009	1038	1801	1802.25	1800.75	1802	315	1800.75
NQ01MIR	1	12/10/2009	1039	1802	1802.75	1801.25	1802	538	1800.75
NQ01MIR	1	12/10/2009	1040	1802	1802.75	1801.5	1802.75	255	1801.5
NQ01MIR	1	12/10/2009	1041	1802.75	1803.75	1802.5	1803.75	299	1802.5
NQ01MIR	1	12/10/2009	1042	1803.5	1803.5	1802	1802.25	455	1801
NQ01MIR	1	12/10/2009	1043	1802.25	1802.75	1802.25	1802.25	321	1801
NQ01MIR	1	12/10/2009	1044	1802.25	1802.25	1801	1801.25	269	1800
NQ01MIR	1	12/10/2009	1045	1801.25	1801.5	1800.25	1800.75	258	1799.5
NQ01MIR	1	12/10/2009	1046	1800.75	1801.75	1800.25	1801.75	297	1800.5
NQ01MIR	1	12/10/2009	1047	1801.5	1801.5	1801	1801	124	1799.75
NQ01MIR	1	12/10/2009	1048	1800.75	1802.5	1800.75	1802.5	108	1801.25
NQ01MIR	1	12/10/2009	1049	1802.5	1802.5	1801.25	1801.25	268	1800
NQ01MIR	1	12/10/2009	1050	1801.5	1801.75	1801	1801.75	220	1800.5
NQ01MIR	1	12/10/2009	1051	1802	1802.25	1800.75	1800.75	147	1799.5
NQ01MIR	1	12/10/2009	1052	1801	1801.5	1800.75	1801.5	174	1800.25
NQ01MIR	1	12/10/2009	1053	1801.5	1802.25	1801.25	1801.25	286	1800
NQ01MIR	1	12/10/2009	1054	1801.25	1801.75	1800.75	1801.25	218	1800
NQ01MIR	1	12/10/2009	1055	1801	1802.25	1800.5	1801.25	513	1800
NQ01MIR	1	12/10/2009	1056	1801	1801.75	1800.75	1801.75	156	1800.5
NQ01MIR	1	12/10/2009	1057	1801.5	1803	1801.5	1801.75	466	1800.5
NQ01MIR	1	12/10/2009	1058	1801.75	1802	1801.5	1801.75	76	1800.5
NQ01MIR	1	12/10/2009	1059	1801.75	1802.5	1801.75	1802.25	134	1801
NQ01MIR	1	12/10/2009	1100	1802.25	1802.25	1801.5	1801.5	113	1800.25
NQ01MIR	1	12/10/2009	1101	1801.5	1802.25	1801.5	1801.5	117	1800.25
NQ01MIR	1	12/10/2009	1102	1801.75	1801.75	1801.25	1801.5	72	1800.25
NQ01MIR	1	12/10/2009	1103	1801.25	1801.75	1801.25	1801.75	127	1800.5
NQ01MIR	1	12/10/2009	1104	1802	1803.25	1802	1803.25	278	1802
NQ01MIR	1	12/10/2009	1105	1803.5	1803.75	1803.25	1803.25	446	1802
NQ01MIR	1	12/10/2009	1106	1803.25	1803.25	1802.25	1802.5	293	1801.25
NQ01MIR	1	12/10/2009	1107	1802.25	1802.75	1802.25	1802.25	277	1801
NQ01MIR	1	12/10/2009	1108	1802.25	1802.5	1802	1802.5	75	1801.25
NQ01MIR	1	12/10/2009	1109	1802.25	1802.75	1802.25	1802.75	105	1801.5
NQ01MIR	1	12/10/2009	1110	1802.75	1803	1802.5	1802.75	264	1801.5
NQ01MIR	1	12/10/2009	1111	1802.75	1802.75	1801.75	1801.75	221	1800.5
NQ01MIR	1	12/10/2009	1112	1801.5	1802.5	1801.5	1802.5	715	1801.25
NQ01MIR	1	12/10/2009	1113	1802.5	1803.5	1802.5	1803.5	524	1802.25
NQ01MIR	1	12/10/2009	1114	1803.5	1803.75	1802.75	1802.75	368	1801.5
NQ01MIR	1	12/10/2009	1115	1802.75	1805	1802.75	1804.25	523	1803
NQ01MIR	1	12/10/2009	1116	1804.25	1804.75	1804	1804.5	260	1803.25
NQ01MIR	1	12/10/2009	1117	1804.5	1805.25	1804.5	1805	472	1803.75
NQ01MIR	1	12/10/2009	1118	1805	1805	1804	1804.25	186	1803
NQ01MIR	1	12/10/2009	1119	1804.5	1804.5	1804	1804.25	406	1803
NQ01MIR	1	12/10/2009	1120	1804.25	1804.5	1803.5	1803.5	769	1802.25
NQ01MIR	1	12/10/2009	1121	1803.75	1804	1803.75	1804	226	1802.75
NQ01MIR	1	12/10/2009	1122	1804	1804	1803	1803	196	1801.75
NQ01MIR	1	12/10/2009	1123	1803.25	1803.75	1803	1803.5	214	1802.25
NQ01MIR	1	12/10/2009	1124	1803.25	1803.5	1803	1803.5	167	1802.25
NQ01MIR	1	12/10/2009	1125	1803.5	1804	1803.5	1803.5	212	1802.25
NQ01MIR	1	12/10/2009	1126	1803.25	1803.25	1802.25	1803	490	1801.75
NQ01MIR	1	12/10/2009	1127	1803.25	1804.75	1803.25	1803.25	528	1802
NQ01MIR	1	12/10/2009	1128	1803.5	1804.25	1802.75	1803.5	221	1802.25
NQ01MIR	1	12/10/2009	1129	1803.5	1803.75	1802.5	1803.25	506	1802
NQ01MIR	1	12/10/2009	1130	1803.25	1803.25	1803	1803	81	1801.75
NQ01MIR	1	12/10/2009	1131	1803.25	1803.75	1802.75	1803.75	178	1802.5
NQ01MIR	1	12/10/2009	1132	1803.75	1805	1803.25	1805	781	1803.75
NQ01MIR	1	12/10/2009	1133	1804.75	1805.25	1804.5	1805.25	503	1804
NQ01MIR	1	12/10/2009	1134	1805.25	1805.25	1803.5	1803.5	202	1802.25
NQ01MIR	1	12/10/2009	1135	1803.5	1804	1802.75	1803.5	425	1802.25
NQ01MIR	1	12/10/2009	1136	1803.25	1804.25	1803.25	1804.25	242	1803
NQ01MIR	1	12/10/2009	1137	1804	1804.25	1803	1803.25	636	1802
NQ01MIR	1	12/10/2009	1138	1803.25	1804	1802.75	1804	267	1802.75
NQ01MIR	1	12/10/2009	1139	1803.75	1803.75	1803.25	1803.5	125	1802.25
NQ01MIR	1	12/10/2009	1140	1803.75	1803.75	1802.75	1802.75	134	1801.5
NQ01MIR	1	12/10/2009	1141	1802.75	1803	1802.75	1802.75	72	1801.5
NQ01MIR	1	12/10/2009	1142	1802.75	1803.75	1802.5	1803.75	525	1802.5
NQ01MIR	1	12/10/2009	1143	1803.75	1803.75	1802.25	1802.5	212	1801.25
NQ01MIR	1	12/10/2009	1144	1802.5	1803.25	1802.25	1802.25	317	1801
NQ01MIR	1	12/10/2009	1145	1802.25	1802.75	1801.75	1802.5	287	1801.25
NQ01MIR	1	12/10/2009	1146	1802.5	1802.5	1802.25	1802.5	75	1801.25
NQ01MIR	1	12/10/2009	1147	1802.5	1802.5	1802	1802.5	215	1801.25
NQ01MIR	1	12/10/2009	1148	1802.5	1802.75	1802.25	1802.75	73	1801.5
NQ01MIR	1	12/10/2009	1149	1802.75	1803.5	1802.25	1803.5	318	1802.25
NQ01MIR	1	12/10/2009	1150	1803.25	1803.25	1802.5	1802.75	222	1801.5
NQ01MIR	1	12/10/2009	1151	1802.75	1802.75	1802	1802.25	156	1801
NQ01MIR	1	12/10/2009	1152	1802.5	1802.5	1801.25	1802.5	357	1801.25
NQ01MIR	1	12/10/2009	1153	1802.25	1802.25	1801.75	1801.75	124	1800.5
NQ01MIR	1	12/10/2009	1154	1802	1802.75	1802	1802.5	177	1801.25
NQ01MIR	1	12/10/2009	1155	1802.25	1802.5	1802	1802.25	185	1801
NQ01MIR	1	12/10/2009	1156	1802.25	1802.25	1801.75	1801.75	175	1800.5
NQ01MIR	1	12/10/2009	1157	1802	1802.25	1802	1802	86	1800.75
NQ01MIR	1	12/10/2009	1158	1802	1802.25	1802	1802	103	1800.75
NQ01MIR	1	12/10/2009	1159	1802	1803	1801.75	1801.75	275	1800.5
NQ01MIR	1	12/10/2009	1200	1801.75	1802.25	1801.5	1802	99	1800.75
NQ01MIR	1	12/10/2009	1201	1802	1802.5	1802	1802.25	135	1801
NQ01MIR	1	12/10/2009	1202	1802.25	1802.5	1801.75	1802.5	119	1801.25
NQ01MIR	1	12/10/2009	1203	1802.25	1802.5	1801.75	1802	198	1800.75
NQ01MIR	1	12/10/2009	1204	1802	1803	1802	1803	302	1801.75
NQ01MIR	1	12/10/2

Hi Narue, thanks for your response. As I mentioned in my OP, i tried to upload a small csv file but daniweb would not let me.... I can email it you however if you'd like?

How did you get your CODE in your post? Do the same thing with your data! Sheesh!

How did you get your CODE in your post? Do the same thing with your data! Sheesh!

I attached the data in a file in the post above.

NQ01MIR 1 12/10/2009 930 1794.25 1799.5 1794 1799 1873 1797.75
NQ01MIR 1 12/10/2009 931 1799 1801 1798.5 1800.5 1004 1799.25
NQ01MIR 1 12/10/2009 932 1800.75 1801 1800 1800.75 647 1799.5
NQ01MIR 1 12/10/2009 933 1800.75 1802 1800.5 1801.5 657 1800.25
NQ01MIR 1 12/10/2009 934 1801.75 1803.25 1801.75 1802 843 1800.75
NQ01MIR 1 12/10/2009 935 1802 1803.75 1801.25 1803.25 1084 1802
NQ01MIR 1 12/10/2009 936 1803.25 1806.75 1803.25 1806 1308 1804.75
NQ01MIR 1 12/10/2009 937 1806 1806 1804.5 1805 755 1803.75
NQ01MIR 1 12/10/2009 938 1805 1805.75 1803.75 1803.75 481 1802.5
NQ01MIR 1 12/10/2009 939 1803.75 1805.5 1803.25 1804 1038 1802.75
NQ01MIR 1 12/10/2009 940 1804 1805.5 1804 1805 1049 1803.75
NQ01MIR 1 12/10/2009 941 1805 1805 1804 1804.25 375 1803
NQ01MIR 1 12/10/2009 942 1804 1806.25 1803.75 1805.25 1323 1804
NQ01MIR 1 12/10/2009 943 1805.25 1805.75 1805.25 1805.5 375 1804.25
NQ01MIR 1 12/10/2009 944 1805.25 1805.5 1804.75 1805 511 1803.75
NQ01MIR 1 12/10/2009 945 1805 1805.75 1804.5 1804.5 871 1803.25
NQ01MIR 1 12/10/2009 946 1804.5 1805.5 1803.75 1804 1104 1802.75
NQ01MIR 1 12/10/2009 947 1804 1804.75 1803.75 1804.5 364 1803.25
NQ01MIR 1 12/10/2009 948 1804.75 1805.25 1803.75 1804 429 1802.75
NQ01MIR 1 12/10/2009 949 1804 1804.5 1803.75 1804 147 1802.75
NQ01MIR 1 12/10/2009 950 1804 1804 1802 1802.25 761 1801
NQ01MIR 1 12/10/2009 951 1802.5 1802.5 1801 1801 393 1799.75
NQ01MIR 1 12/10/2009 952 1801.25 1802 1800.5 1802 350 1800.75
NQ01MIR 1 12/10/2009 953 1802 1802 1799 1799.5 495 1798.25
NQ01MIR 1 12/10/2009 954 1799.5 1800.75 1799.25 1799.75 434 1798.5
NQ01MIR 1 12/10/2009 955 1800 1801.25 1800 1800.75 450 1799.5
NQ01MIR 1 12/10/2009 956 1800.75 1800.75 1799.75 1799.75 128 1798.5
NQ01MIR 1 12/10/2009 957 1799.5 1801 1799.5 1800.5 444 1799.25
NQ01MIR 1 12/10/2009 958 1800.5 1802 1800.5 1801.75 270 1800.5
NQ01MIR 1 12/10/2009 959 1801.75 1802.25 1799.75 1799.75 129 1798.5
NQ01MIR 1 12/10/2009 1000 1800 1800.75 1799.75 1800 270 1798.75

Edited 5 Years Ago by toneranger: n/a

Question: Are you positive that there are actually tabs between the data columns and not just n spaces?

Edited 5 Years Ago by MonsieurPointer: n/a

Question: Are you positive that there are actually tabs between the data columns and not just n spaces?

Salut Monsieur,

I opened up the price data file (attached in post above) and I see a tab between the date and time field, but then it looks like n space between the other fields. (the first and last field are ignored in the program). If that's the problem, how does one go about skipping white spaces of variable length?

This article has been dead for over six months. Start a new discussion instead.