| 1 |
#include <iostream> |
| 2 |
|
| 3 |
using namespace std; |
| 4 |
|
| 5 |
int main() { |
| 6 |
cout << R"asd( |
| 7 |
#include <iostream> |
| 8 |
#include <fstream> |
| 9 |
|
| 10 |
using namespace std; |
| 11 |
|
| 12 |
int main(int argc, const char *argv[]) { |
| 13 |
if(argc < 2) { |
| 14 |
cerr << argv[0] << " requires an output file!" << endl; |
| 15 |
return 1; |
| 16 |
} |
| 17 |
ofstream out1(string(argv[1]) + ".hpp"); |
| 18 |
ofstream out2(string(argv[1]) + ".cpp"); |
| 19 |
out1 << R"( |
| 20 |
#pragma once |
| 21 |
|
| 22 |
#include <string> |
| 23 |
|
| 24 |
std::string getStr(); |
| 25 |
)"; |
| 26 |
|
| 27 |
out2 << R"( |
| 28 |
#include ")" << argv[1] << R"(.hpp" |
| 29 |
|
| 30 |
std::string getStr() { |
| 31 |
return "Hello World"; |
| 32 |
} |
| 33 |
)"; |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |
| 37 |
)asd"; |
| 38 |
|
| 39 |
return 0; |
| 40 |
} |