Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.c Subject: Re: "array" vs. "&array" ? Message-ID: <1989Dec23.151411.3688@virtech.uucp> Date: 23 Dec 89 15:14:11 GMT References: <1989Dec22.013757.3086@sj.ate.slb.com> <571@mwtech.UUCP> Organization: Virtual Technologies Inc. Lines: 27 In article <571@mwtech.UUCP>, martin@mwtech.UUCP (Martin Weitzel) writes: > To my understanding, the following *is* a type mismatch: > ----------------------------------------------------------------------- > main() > { > char a[10], (*p)[10]; > > p = a; > warning: illegal pointer combination, op = > } Did you try a cast? Try the following: main() { char a[10], (*p)[10]; p = (char (*)[10]) a; } this worked fine for me. No complaints from the compiler. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+