int array[] ={1,2,3,4};
The output of next_permutation() on the above array result in
1 2 3 4
1 2 4 3
1 3 2 4
1 3 4 2
.....
.....
2 4 3 1
...
...
What I like to be output is permutation of those numbers, but in different orders each time the function is called.
E.X
2 4 3 1
1 4 3 2
2 1 3 4
1 2 4 3
3 4 2 1
4 2 1 3
...
...
1 2 3 4

You can store all permutations in 2D vector. Then You need to create another vector with M! elements (indexes). Random_shuffle vector with indexes and you have order in which You should read data from 2D vector (with all permutations).
But since (N < M) this algorithm is little overkill, because no matter how big N would be, you always have to generate all permutations.

I would like to ask how can I adjust array.csv like this:
,,,-00.000146400000, 0.08000,
,,,-00.000146200000, 0.00000,
,,,-00.000146000000, 0.00000,
,,,-00.000145800000, 0.00000,

so I can have in first column -00.000146400000 ...

I have an assignment to output contents from a .txt file to html. I'm able to output the information from the .txt to the console but how would I output ...