C++ :
std::filesystem::path filePath(argv[1]);
std::ifstream file(filePath, std::ios::binary);
std::string fileSource((std::istreambuf_iterator<char>(file)),
std::istreambuf_iterator<char>());
std::cout << fileSource << std::endl;
retarded
C :
FILE* f = fopen(argv[1], "r");
fseek(f, 0, SEEK_END);
size_t sz = ftell(f);
fseek(f, 0, SEEK_SET);
Comment too long. Click here to view the full text.