delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/14/19:51:31

From: sleeper8088 AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Passing array to function trouble.
Date: Mon, 15 Jan 2001 00:27:05 GMT
Organization: Deja.com
Lines: 21
Message-ID: <93tg4j$8n9$1@nnrp1.deja.com>
References: <rxq86.4295$wt2 DOT 34296 AT news1 DOT oke DOT nextra DOT no>
NNTP-Posting-Host: 203.83.73.3
X-Article-Creation-Date: Mon Jan 15 00:27:05 2001 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
X-Http-Proxy: 1.0 PROXY, 1.0 x56.deja.com:80 (Squid/1.1.22) for client 203.83.73.3
X-MyDeja-Info: XMYDJUIDsleeper8088
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <rxq86.4295$wt2 DOT 34296 AT news1 DOT oke DOT nextra DOT no>,
  "Jon" <lennier AT online DOT no> wrote:
> Does anyone know how I can pass an array like this: char a[20][30];
to a
> function?
> How would the prototype for a function which would take this as an
argument,
> and how should
> it be passed to the function?
>
>

Just pass it as a pointer, prototype shall be like this

void aFunction (char *p);

sl.


Sent via Deja.com
http://www.deja.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019