From owner-freebsd-hackers Tue Nov 21 07:57:26 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA29572 for hackers-outgoing; Tue, 21 Nov 1995 07:57:26 -0800 Received: from bigbird.vmicls.com (bigbird.vmicls.com [198.17.96.3]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id HAA29564 for ; Tue, 21 Nov 1995 07:57:17 -0800 Received: from gonzo by bigbird.vmicls.com (8.6.9/SMI-4.1-vmicls-master-host-1) id KAA03922; Tue, 21 Nov 1995 10:59:42 -0500 From: Jerry.Kendall@vmicls.com (Jerry Kendall) Organization: VMI Communications and Learning Systems Received: by gonzo (5.0/vmi-client-host-1) id AA27128; Tue, 21 Nov 1995 10:59:39 +0500 Date: Tue, 21 Nov 1995 10:59:39 +0500 Message-Id: <9511211559.AA27128.gonzo@vmicls.com> To: freebsd-hackers@freebsd.org Subject: HELP with typedef X-Sun-Charset: US-ASCII content-length: 874 Sender: owner-hackers@freebsd.org Precedence: bulk Hello all. Don't know the name of a mailing list for 'C' hackers. So, I sent it here. Can somebody tell me the name of a hackers list for the 'C' language ??? I need to create a subroutine that is passed a pointer to an array of pointers to strings. ie: address of (char *list[]). I need it to be a typedef as the routine called will handle lists of different sizes. This is better than using variable args for this task. My co-workers and I are a little stumped. Included below is the only solution I could come up with. BUT it does not compile. Help of some form would be great. Jerry. ------------------------------- typedef char *[] StringList; StringList List = {"one","two","three","four","END OF LIST",""}; PrintList( StringList *List) { int x; for(x = 0; List[x] != 0; x++) printf("List entry %d: %s\n", List[x]); } main() { PrintList(&List); }