void write_csv_file(double A[], int length, string file_name) //Function that prints array A to a *.csv file { ofstream output(file_name);
Continue ReadingC++: Create a File
In this task, the job is to create a new empty file called "output.txt" of size 0 bytes and an empty directory called "docs". This should be done twic
Continue ReadingC++: File Modification Time
This task will attempt to get and set the modification time of a file. #include <boost/filesystem/operations.hpp> #include <ctime> #i
Continue ReadingC++: File Size
In this task, the job is to verify the size of a file called "input.txt" for a file in the current working directory and another one in the file syste
Continue ReadingC++: Globally Replace Text in Several Files
The task is to replace every occurring instance of a piece of text in a group of text files with another one. For this task we want to replace the tex
Continue ReadingC++: Find Common Directory Path
Create a routine that, given a set of strings representing directory paths and a single character directory separator, will return a string representi
Continue ReadingC++: Delete a File
In this task, the job is to delete a file called "input.txt" and delete a directory called "docs". This should be done twice: once "here", i.e. in the
Continue ReadingC++: Include a File
The task is to demonstrate the language's ability to include source code from other files. In C and C++, inclusion of other files is achieved via a
Continue ReadingC++: Check That File Exists
In this task, the job is to verify that a file called "input.txt" and the directory called "docs" exist. This should be done twice: once for the curre
Continue ReadingC++: File Input/Output
In this task, the job is to create a file called "output.txt", and place in it the contents of the file "input.txt", via an intermediate variable. In
Continue Reading