Dears, I have written the following code to reverse a data file with deleting 15 lines from the top and the bottom. My question is: after reversing, how to write a certain line at the top of the reversed file, say" The reversed file is:"
Thanks in advance.
[code]
Put the code you need help with here.
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <iostream>
#include <string>
#include <stack>
#include"stdafx.h"
using namespace std;
int main () {
string s;
ifstream in;
in.open("input.txt");