Question: #include #include #include using namespace std; const int SIZE { 1 0 } ; struct SentenceData { int numSwapped [ SIZE ] { } ;

#include
#include
#include
using namespace std;
const int SIZE{10};
struct SentenceData {
int numSwapped[SIZE]{};
string sentence[SIZE]{};
int total{0};
vector rvColors;
vector rvPhrases;
ofstream output;
string resultsOriginal;
string resultSwapped;
string colorFile{ "Colors.txt"};
string sentenceFile{ "Sentences.txt"};
string swapPhrasesFile{ "SwapPhrases.txt"};
string outputFile{ "Out.txt"};
};
void WriteHeader();
void AskForInputFilenames(string& colorFile, string& sentenceFile, string& phraseFile);
string AskForOutputFilename();
bool ReadColors(vector& rvColors, string filename);
bool ReadPhrases(vector& rvPhrase, string filename);
bool ReadSentences(string sentences[], string filename, SentenceData* pData);
bool WriteOriginals(SentenceData& data, int totalSentencesModified, string filename);
bool WriteResults(SentenceData& data, string filename);
int SwapColors(SentenceData& data);
void SayGoodbye();
#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!