Compiler problem with fstream

Hi there, I’m trying to compile a simple program to read in waveforms
from a binary file. Unfortunately, I’m running this under linux on
x86, and the data was created by labview. So, I wrote a small piece
of code that swaps bits, etc, though there seems to be some
fundamental compiler problem that I’m running into. I’m attaching my
simple files

Test.cc
Makefile

tar.gz’d so maybe someone could take a look to see what’s going on?

The error that I get is:

[root@localhost Test]# gmake Test
g++ -pthread -I/usr/local/root/include -DHAVE_CONFIG_H -g -O3 -c -o
Test.o Test.cc
Test.cc: In function Double_t GetBinaryWaveform(Double_t*, const Int_t*, std::ifstream&)': Test.cc:27: error: no matching function for call tostd::basic_ifstream<char,
std::char_traits >::read(Float_t[(npts)], unsigned int)’
/usr/include/c++/3.3.3/bits/istream.tcc:703: error: candidates are:
std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT,
_Traits>::read(_CharT
, int) [with _CharT = char, _Traits =
std::char_traits]
gmake: *** [Test.o] Error 1
[root@localhost Test]#

Looks like some simple problem with fstream, when I try to read in a line from a file.

Jesse
Test.tar.gz (853 Bytes)

Hi,

You need to use

Cheers,
Philippe