Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: nyu notesfiles V1.1 4/1/84; site acf4.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!cmcl2!acf4!greenber From: greenber@acf4.UUCP Newsgroups: net.lang.c Subject: Ptr to func doesn't like casting?? Message-ID: <13900010@acf4.UUCP> Date: Sun, 25-Nov-84 17:23:00 EST Article-I.D.: acf4.13900010 Posted: Sun Nov 25 17:23:00 1984 Date-Received: Tue, 27-Nov-84 04:00:46 EST Organization: New York University Lines: 33 Nf-ID: #N:acf4:13900010:000:737 Nf-From: acf4!greenber Nov 25 17:23:00 1984 <> Here is an interesting one (I think!!): given a declaration such as: int (* varname)(); it certainly should point to a function returning int. Now if I wish to temporarily hold a pointer to a string there, and I get the pointer from a function: char *function(); varname = function(); barfs in any of the lint-like guys I use with a legitimate gripe, that is "pointers don't point to same object, you dumbo!". Well, (char *)varname = function(); doesn't work (lvalue required). And, varname = (*function())(); doesn't work consistantly. So what's a poor boy to do? In particular, I am using this under Lattice C. Let me know at the below address: Ross M. Greenberg @ NYU ----> allegra!cmcl2!acf4!greenber <----