Where do you think I am going wrong ?
You should use [code]...[/code] tags around your code 
mlock.c is not part of Qt. Run your code in your debugger until it crashes and then look at the backtrace to find the offending part of your code.
This code:
//x and y are read from files created using the above
QByteArray alpha;
for(int k
=0;k<qMin
(x.
size(), y.
size());k
++){ alpha.
append(x
[k
]-y
[k
]);
} qDebug
()<<z.
toHex();
QByteArray beta;
for(int j
=0;j<qMin
(x.
size(),alpha.
size());
++j
) { alpha.
append(x
[j
]+z
[j
]);
} qDebug
()<<beta.
toHex();
//x and y are read from files created using the above
QByteArray alpha; for(int k=0;k<qMin(x.size(), y.size());k++){ alpha.append(x[k]-y[k]); } qDebug()<<z.toHex();
QByteArray beta; for(int j=0;j<qMin(x.size(),alpha.size());++j) { alpha.append(x[j]+z[j]); } qDebug()<<beta.toHex();
To copy to clipboard, switch view to plain text mode
You add byte differences to an array called alpha then print an array called z.
You then add byte sums to the array called alpha then print the array called beta.
Neither debug output is likely to be what you expect.
Also, you second loop is bounds are set based x and alpha size but you are using them to index an unrelated z[] which is probably empty or, if not, smaller than either x or alpha. Out-of-bounds memory accesses are a recipe for program termination.
Bookmarks