5 int main(int argc
, char *argv
[])
8 float x
, y
, z
, xR
, yR
, zR
, t
;
10 file
.setFileName(argv
[1]);
12 // Open file for writing
13 file
.open(QIODevice::WriteOnly
);
14 QDataStream
out(&file
);
16 for (t
= 0.0; t
< 100.0; t
+= 1.0)
17 out
<< (float)(5.0 * t
* t
) << 0.0f
<< 0.0f
<< 0.0f
<< 0.0f
<< 0.0f
;
20 // Open file for reading
21 file
.open(QIODevice::ReadOnly
);
22 QDataStream
in(&file
);
25 in
>> x
>> y
>> z
>> xR
>> yR
>> zR
;
26 std::cout
<< "x = " << x
31 << "\tzR = " << xR
<< "\n";