C++: Write CSV File

Bjarne-stroustrup
 

void write_csv_file(double A[], int length, string file_name) 
//Function that prints array A to a *.csv file
{  
	ofstream output(file_name);
	for(int i = 0; i < length; i++)
	{  
		output << A[i] << endl; 
	} 
}