I got a problem implementing a PHP programm in C++. It is about the PHP/Perl function unpack. I don't know how to do the follwing in C++ (no problem in reading a file... but how do i unpack("C*") the read contents).
<?php
$file = fopen("bitmaskt.dat", "rb");
//create the data stream
$matrix_x = unpack("C*", fread($file, 286));
$matrix_y = unpack("C*", fread($file, 286));
$mask_data = unpack("C*", fread($file, 286));
$reed_ecc_codewords = ord(fread($file, 1));
$reed_blockorder = unpack("C*", fread($file, 128));
fclose($file);
?>
Currently, I'm very hopeless solving this problem on my own - I'm searching for days, all I found are questions... Is there any free unpack() c++ implementation out there? :-(