xxd --include example.dataWhen file example.data contains "example\n" you get:
unsigned char example_data[] = { 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x0a }; unsigned int example_data_len = 8;So, of course you can do:
xxd --include example.data > example.cppPerhaps in a Makefile