| www.delorie.com/archives/browse.cgi | search |
| From: | Waldemar Schultz <schultz AT ma DOT tum DOT de> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | array casting |
| Date: | Fri, 12 Jan 2001 17:17:22 +0100 |
| Organization: | [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) |
| Lines: | 26 |
| Message-ID: | <3A5F2E12.9A6C50FC@ma.tum.de> |
| NNTP-Posting-Host: | pcritter10.mathematik.tu-muenchen.de |
| Mime-Version: | 1.0 |
| X-Trace: | wsc10.lrz-muenchen.de 979316250 27487 131.159.69.74 (12 Jan 2001 16:17:30 GMT) |
| X-Complaints-To: | news AT lrz-muenchen DOT de |
| NNTP-Posting-Date: | 12 Jan 2001 16:17:30 GMT |
| X-Mailer: | Mozilla 4.73 [de]C-CCK-MCD DT (Win98; U) |
| X-Accept-Language: | de,en,en-US |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
assume the following prototype
int poly(int n, int data[][2]);
I tried to compile something like
void do_poly(int n)
{
int **data=malloc(... n);
...
poly(n, data); //call the function
...
}
and of course GCC warns me about the parameter type mismatch.
Q:Is there an elegant & portable way to somehow 'cast' the int **data to be
accepted as int data[][2] (supposed it's allocated correctly) ?
I dont like my programs containing code I will be warned about,
every time I compile it.
Thanks for your help;
--
Gruss Waldemar Schultz.
Technische Universität München, Zentrum Mathematik M1, D 80290 München
Tel: +49 (0)89 2892 8226 FAX: +49 (0)89 2892 8228
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |