Say I have a program that creates a database file, and imports data to it from a .sql file.
If I don’t want a random .sql file floating around my directory, is there a way to compile this static file into the executable for use without having to copy it’s contents into a string in a C file? A define statement perhaps?
You can convert the statements in the SQL file into a set (an array) of strings, put the strings in a source file and build your application with that. Use
#defineto create names for the indexes into the array.