Hi all,
I have a text file and need to include it as a string in the firmware.
For example:
char textFile[] = "#include "file.txt"";
Where file.txt contains:
abc
The result I want to get is:
char textFile[] = "abc";
You guys know any tricks?
Thanks,
Anh
You can't do this. Write a utility program that process the file and produces a string that a C compiler can accept, using preprocessor or otherwise.
- mike
If you could include the quotes in the text file, ie
"abc"
you could do:
char textFile[] = #include "file.txt" ;
Thanks. Looks like i do need to write a utility to convert it.
Ok,