P
Peng Yu
I want to define a macro
#define FILEWR(FILENAME)
which can be expanded to
#ifndef OUTFILE
#define OUTFILE
ofstream out;
#endif
out.open(FILENAME);
out << "A" << endl;
out.close();
Do you have any idea how to do this? Thanks!
Peng
#define FILEWR(FILENAME)
which can be expanded to
#ifndef OUTFILE
#define OUTFILE
ofstream out;
#endif
out.open(FILENAME);
out << "A" << endl;
out.close();
Do you have any idea how to do this? Thanks!
Peng