Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!stl!dsr From: dsr@stl.stc.co.uk Newsgroups: comp.lang.c Subject: (CHAR *)(STRUCT) Message-ID: <2401@stl.stc.co.uk> Date: 13 Nov 89 11:13:28 GMT Sender: news@stl.stc.co.uk Reply-To: dsr@stl.stc.co.uk () Organization: STC Technology Limited, London Road, Harlow, Essex, UK Lines: 10 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?