- ofstream outputFile;
- m->openOutputFile(outputFileName, outputFile);
-
- char c;
- for(int i=0;i<numInputFiles;i++){
- ifstream inputFile; //declaration must be inside for loop of windows throws an error
-
- m->openInputFile(fileNames[i], inputFile);
-
- while(!inputFile.eof()){
- if (m->control_pressed) { outputTypes.clear(); inputFile.close(); outputFile.close(); m->mothurRemove(outputFileName); return 0; }
-
- c = inputFile.get();
- //-1 is eof char
- if (int(c) != -1) { outputFile << c; }
- }
-
- inputFile.close();
- }
-
- outputFile.close();
+ m->mothurRemove(outputFileName);
+ for(int i=0;i<numInputFiles;i++){ m->appendFiles(fileNames[i], outputFileName); }