S
Stacy Mader
Greetings all,
I have a VMS binary file with weather data. The record
on each line is 1xint(8) 12xint(2)
Using the perl unpack function, I can decode the
binary file like this:
<snip>
my $template="x8v12"; #v = short in "VAX" (little-endian) order.
my $recordsize=length(pack($template,()));
my($record,$string);
while(read(IN,$record,$recordsize)) {
my(@fields) = unpack($template,substr($record,2,32));
... process @fields here
}
}
<snip>
Does anyone know of a way to do this in C++ ? I have yet
to find a library which can help me...
Regards and thanks in advance,
Stacy.
I have a VMS binary file with weather data. The record
on each line is 1xint(8) 12xint(2)
Using the perl unpack function, I can decode the
binary file like this:
<snip>
my $template="x8v12"; #v = short in "VAX" (little-endian) order.
my $recordsize=length(pack($template,()));
my($record,$string);
while(read(IN,$record,$recordsize)) {
my(@fields) = unpack($template,substr($record,2,32));
... process @fields here
}
}
<snip>
Does anyone know of a way to do this in C++ ? I have yet
to find a library which can help me...
Regards and thanks in advance,
Stacy.