#include <iostream> | |
#include <fstream> | |
using namespace std; | |
int main() { | |
ofstream hpp("libC.hpp"); | |
ofstream cpp("libC.cpp"); | |
if (!hpp.is_open() || !cpp.is_open()) { | |
cerr << "Failed to open 'libC.hpp' or 'libC.cpp' for writing" << endl; | |
return 1; | |
} | |
hpp << R"cpp( | |
#pragma once | |
#include <string> | |
std::string getGenStr(); | |
)cpp"; | |
cpp << R"cpp( | |
#include "libC.hpp" | |
std::string getGenStr(void) { | |
return "GEN STR"; | |
} | |
)cpp"; | |
return 0; | |
} |