(CHAR *)(STRUCT)
dsr at stl.stc.co.uk
dsr at stl.stc.co.uk
Mon Nov 13 22:13:28 AEST 1989
I want to make up a macro which would take a pointer to anything and
convert it into CHAR so that I could send the resulting string over a
pipe. The macro is intended to provide a generic call to a READ/WRITE
type of routine. However when I try it on Structures the compiler
says that this is not allowed. Given that you can malloc space for a
structure which is correctly formatted, why can't you cast a
structure?
Is there any way around this? Has anyone got a couple of routines to
send any type data over a pipe from a generic call?
More information about the Comp.lang.c
mailing list