Question: #include #include #include using namespace std; void reverseString(string& str) { int n =str.length(); for (int i=0; i } ifstream infile1(textfile2.txt); ofstream outfile2(textfilereverse.txt); if (!outfile2) {
#include
void reverseString(string& str) { int n =str.length(); for (int i=0; i } ifstream infile1("textfile2.txt"); ofstream outfile2("textfilereverse.txt"); if (!outfile2) { cout<< "Reverse file could not be created"< }} infile.close(); outfile.close(); outfile1.close(); outfile2.close(); return 0; } Im having an issue with reversing the string then writing it to a file at the final step of this code , can someone pinpoint me to what im doing wrong
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
