6 int main(int argc
, char *argv
[])
9 float x
, y
, z
, xR
, yR
, zR
, t
;
12 file
.setFileName(argv
[1]);
14 // Open file for writing
15 file
.open(QIODevice::WriteOnly
);
16 QDataStream
out(&file
);
18 for (i
= 0; i
< 100; i
++) {
19 for (t
= 0.0; t
< 50.0; t
+= 1.0) {
20 out
<< (float) (5.0 * t
* t
) << 0.0f
<< 0.0f
21 << (float) (cos(t
) * 180.0) << 0.0f
<< 0.0f
;
26 // Open file for reading
27 file
.open(QIODevice::ReadOnly
);
28 QDataStream
in(&file
);
31 in
>> x
>> y
>> z
>> xR
>> yR
>> zR
;
32 std::cout
<< "x = " << x
37 << "\tzR = " << zR
<< "\n";