From owner-freebsd-questions@FreeBSD.ORG Tue Jun 30 00:41:30 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EFE5106567D for ; Tue, 30 Jun 2009 00:41:30 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1C93D8FC17 for ; Tue, 30 Jun 2009 00:41:29 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from mr08.lnh.mail.rcn.net ([207.172.157.28]) by smtp02.lnh.mail.rcn.net with ESMTP; 29 Jun 2009 20:41:29 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr08.lnh.mail.rcn.net (MOS 3.10.6-GA) with ESMTP id KYU53036; Mon, 29 Jun 2009 20:41:28 -0400 (EDT) Received: from 209-6-22-188.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.22.188]) by smtp01.lnh.mail.rcn.net with ESMTP; 29 Jun 2009 20:41:29 -0400 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19017.24376.343126.389436@jerusalem.litteratus.org> Date: Mon, 29 Jun 2009 20:41:28 -0400 To: questions@freebsd.org X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr08.lnh.mail.rcn.net) Cc: Subject: OT: C syntax question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 00:41:30 -0000 Let us suppose I have a structure: struct CONTINENT { ... } I use this to create an array of pointers to said struct: struct CONTINENT *Asia[10][10]; Now I pass this array to a function: plate_shift(Asia, (int) foo, (float) bar); In the definition of the function, I say: int plate_shift(Cont,f,b) struct CONTINENT *Cont[10][10]; int f; float b; { ... } and the compiler does not complain. If, however, I try to prototype the function as: extern int plate_shift(struct CONTINENT *[][],int,float); with: CFLAGS = -Wall -std=c99 I get: error: array type has incomplete element type Changing to: extern int plate_shift(struct CONTINENT *foo[][],int,float); returns the same error. K&R 2ed is not helpful, nor is a quick poke around the web. What am I forgetting? Respectfully, Robert Huff