We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78e747b commit 93d3f9aCopy full SHA for 93d3f9a
shuffle.cc
@@ -4,6 +4,7 @@
4
#include <cstdlib>
5
#include <ctime>
6
#include <fstream>
7
+#include <string>
8
9
using namespace std;
10
@@ -22,8 +23,7 @@ int main()
22
23
srand(time(0));
24
25
ofstream myfile;
- myfile.open ("output.csv");
26
- myfile.open("output" << filecount << ".csv");
+ myfile.open("output" + to_string(filecount) + ".csv");
27
28
for(int i=0; i < NUM_SIZE; i++) //Added numbers to the vector
29
{
@@ -51,7 +51,7 @@ int main()
51
count = 0;
52
filecount++;
53
myfile.close();
54
- myfile.open("output" << filecount << ".csv"); //Open the new file
+ myfile.open("output" + to_string(filecount) + ".csv");//Open the new file
55
}
56
count++;
57
0 commit comments