Re: A C Question: sue me ;)

From: Wout Mertens (
Date: 05/20/96

On Sat, 18 May 1996, Graham Gilmore wrote:
> 	I'm trying to read in stuff from a file directly into a structure 
> using fscanf().  fscanf() of course requires pointers;  how do I generate 
> a pointer for an int member of the structure?

Uhm. I think there's something like offsetof(), so you could try that. 
Like in ptr = &struct + offsetof(struct.member)
I don't know if it works like that or if the addition is legal, but hey, 
you can tell me if it worked :)

Gekke Eekhoorn of BUG.

This archive was generated by hypermail 2b30 : 12/18/00 PST