ALL 0.9.4
A Loadbalacing Library
Loading...
Searching...
No Matches
Amalgamate.cpp
Go to the documentation of this file.
1#include <stdlib.h>
2
3#define STB_INCLUDE_IMPLEMENTATION
4#define STB_INCLUDE_LINE_NONE
5#include <string>
6#include <fstream>
7
8int main(int argc, char **argv)
9{
10 if(argc<3)
11 {
12 printf("Usage: %s MAIN_FILE INCLUDE_PATH\n", argv[0]);
13 return EXIT_FAILURE;
14 }
15 char Error[256];
16
17 std::ifstream inFile(argv[1]);
18 std::string contents((std::istreambuf_iterator<char>(inFile)), std::istreambuf_iterator<char>());
19
20 const char *Amalgamated = contents.c_str();
21 if(!Amalgamated)
22 {
23 printf("%s", Error);
24 return EXIT_FAILURE;
25 }
26 printf("%s",Amalgamated);
27 return EXIT_SUCCESS;
28}
int main(int argc, char **argv)
Definition Amalgamate.cpp:8