so i been using i/o streams and i understand how to open, check to see if file fails and close files but i cannot understand how to change it to something new i g2 do these,
Change dashes to spaces.
Change all characters to lowercase. Change digits to * (asterisks).
Display these two totals after processing the file:
Count all spaces written to the output file.
Count all alphabetic characters written to the output file.

any hints or tips or any help would be greatly appreciated.

so here the start of my code

#include <iostream>
include <iomanip>
#include <fstream>
#include <cstdlib>
#include <cctype>
using namespace std; 
void editFile(ifstream& infile, ofstream& outfile);
int main()
	ifstream infile;
	ofstream outfile;
	cout << "Editing file will now begin.\n";
	//textin file"C:\\textin.dat");//home
	//"F:\\cins 225\\textin.dat");//away
	if (
		cout << "Input file has failed to open, now exiting.\n";
	//textout file"C:\\textout.dat");//home
	//"F:\\cins 225\\textout.dat");//away
	if (
		cout << "Output file has failed to open, now exiting.\n";
	//editFile(infile, outfile);
	//char next;
	//while (next != '.' )
	//	if (next == '-' );
	//	{
	//		outfile << " ";
	//	}
	//	 if(next = isalpha)
	//	{
	//		 next = tolower(' ');
	//	}
	infile.close( );
	outfile.close( );
	cout << "Editing file will now end.\n";
	return 0;

btw in the file its says
it-is a-CaPital Mistake tO-theorize Before-one has DatA123.
and i have to change that

use getline() to read each line of the file then a loop to iterate through the string

std::string line;
while( getline( infile, line ) )
    // make changes not shown
    outfile << line << "\n";