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