Hello! I'm trying to write a program, that replaces inscpitions like "\input{C:\FullFileName.txt}" to maintenance of FullFileName.txt. It now looks like
#include <fstream>
using namespace std;
#define shint short unsigned int
const char* InS ="input{";
ofstream log ("C:\\Users\\DimOK\\Desktop\\Lat\\TEST1\\log.txt");
bool EqN (ifstream &as, const char *ba, shint l){...} // takes l chars from as. True if they're equall to ba;
int main()
{
log << "\nThe begining."; // this isn't writing to file. WHY?
ifstream i ("C:\\Users\\DimOK\\Desktop\\Lat\\TEST1\\Square_Equals_Task.tex");
ofstream o ("C:\\Users\\DimOK\\Desktop\\Lat\\TEST1\\Square_Equals_Task2.tex");
//some other code
o.put(i.get());//is this correct? Are there such overloads in std?
return 0;
}
The program finishes incorrectly and nothing is writen to log.
I would be glad to hear some advice about how to do it easier.
P.S. Sorry for my strange language.