Hi all i was wondering if i could get some help on input output.
ofstream a_file ( "3D Graph.txt", ios::app);
for loop;
Code:
case 0:
{
Grid[++x][y][z] = Output[j];
a_file << x << " " << y << " " << z << " " << Output[j] << endl;
}
break;
Above is a snippet of the code i'am using:
Below is what its output looks like:
28 28 27 1
28 27 27 1
28 27 26 1
27 27 26 1
27 26 26 1
28 26 26 1
28 26 27 1
28 25 27 1
28 25 26 1
29 25 26 1
29 25 27 1
29 25 28 1
29 26 28 1
28 26 28 1
28 27 28 1
28 27 29 1
28 28 29 1
28 28 28 1
29 28 28 1
29 27 28 1
And here is what i would like it to look like
[29,29,29,28,28,28,28,28,27,27,27,27,28,28,28,28,28 ,28,28,28,29,29,29,29,29]
[28,29,29,29,28,27,26,26,26,26,25,25,25,25,25,24,24 ,23,23,23,23,23,24,24,25]
[28,28,27,27,27,27,27,26,26,27,27,26,26,27,28,28,29 ,29,28,27,27,26,26,27,27]
Anyone know of a snazzy way to do it bar just putting each line in a seperate txt file?
any help appreciated
Regards Wolfe