fork download
  1. #include <stdio.h>
  2.  
  3. #define dbg_printf(fmt, var) printf("0x%08lx\t"#var"\t"fmt"\r\n", &var, var)
  4.  
  5. struct GFF_File {
  6. char FileType[4];
  7. };
  8.  
  9. int main()
  10. {
  11. GFF_File MEMORY_gff = {"foo"};
  12. GFF_File *test = (GFF_File *)&MEMORY_gff;
  13.  
  14. dbg_printf("%.4s", test->FileType);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
0xbfd09904	test->FileType	foo