Essentially, what I'm looking for is a function that would allow me to do something like this:
Dumper(some_obj); /* outputs some_objs' data structure */
Thanks.
Essentially, what I'm looking for is a function that would allow me to do something like this:
Dumper(some_obj); /* outputs some_objs' data structure */
Thanks.
Short answer: no.
Long answer: by the time your program's been compiled and linked, all of that information has been thrown away. C (and C++) don't have reflection, so none of this information can be recovered at runtime.
Intriguing answer: Since you're on Windows, you can do various things with debug information (i.e. PDB files) and the DbgHelp API.
C doesn't support any kind of reflection out of the box. Also it's not hard typed in the sense that once it's compiled to machine code, types aren't there any more (unlike in some higher level languages). You need to build your executable with all the symbols and debug info and then use some debugging tool or library to retrieve this data.
I suppose just using an estabilished debugger such as the Visual Studio Debugger or gdb would be much simpler.