I am making a program that I want to read in a file and store the contents of the file into the actual program. Then the program once ran, will be able to make a new file with the one that was embedded into it.
Program.c compile with picture.jpg
Program is now the output file that has picture.jpg inside of it
Program runs and then creates a new file called pic.jpg
Program reads somewhere(?) in its own code to find the data of the picture.jpg
Program writes the data to pic.jpg
Now pic.jpg and picture.jpg are the same file.
I did some reading and found a little article that explains it: https://codeplea.com/embedding-files-in-c-programs
Towards the bottom at "Alternative - Linking the Blob in Directly"
The question I am having is, how does
extern const char binary_some_file_jpg_start[];
extern const char binary_some_file_jpg_end[];
tell me where my data is? Could those have been any random names and it still knows where to go to find the data?