Is it possible to fake a file stream, such as stdin, in C?
问题 I am working on an embedded system with no filesystem and I need to execute programs that take input data from files specified via command like arguments or directly from stdin. I know it is possible to bake-in the file data with the binary using the method from this answer: C/C++ with GCC: Statically add resource files to executable/library but currently I would need to rewrite all the programs to access the data in a new way. Is it possible to bake-in a text file, for example, and access it