It would appear that we have a cockpit error, in other words it would appear that I am just a moron. When testing the app, my shell pwd wasn't where the app was located (I was a level above it), so I was running,

./test/datasplit.exe -c _v33-1_S2A_columns.txt -m 5

so the file "_v33-1_S2A_columns.txt" wasn't in ./, but in ./test/ with the app, so the filename passed by the shell didn't really exist.

If I run,

./test/datasplit.exe -c ./test/_v33-1_S2A_columns.txt -m 5

then I am fine. That's what I get for trying to be clever and run everything out of one shell.

I guess I should have trapped the existance of the filename and not if the stream had been opened. Is there a simple method to test if a file exists?

Sorry for the annoyance.

LMHmedchem