Mail Archives: djgpp/1997/08/01/18:52:38
From: | Matt Darland <mtd5922 AT omega DOT uta DOT edu>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | A pointer is a pointer, right?
|
Date: | Thu, 31 Jul 1997 21:45:20 -0500
|
Organization: | University of Texas Arlington
|
Lines: | 24
|
Message-ID: | <Pine.OSF.3.96.970731213511.11420B-100000@omega.uta.edu>
|
NNTP-Posting-Host: | omega.uta.edu
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I have a slight problem with DJGPP compiler.
I have a class called Nation (it's global war simulator for school).
In the main I have declared an array of pointers to Nation, ( *Nation[6])
In private section of Nation I have declared a pointer to this array,
( Nation *(*array)[] ). In the constructor, I want to pass the address
of the array in the main to the private array pointer in Nation. My
constructor prototype looks like:
Nation( const char* name, double money, Nation *(*array)[] )
When I try to compile the program the error is 'declaration of a pointer
to an array of unspecified bounds.' I thought a pointer was simply a
4 byte address in DJGPP, why would the compiler need to know the array
bounds? Or is my declaration screwy ( I also tried Nation *( (*array)[])
).
Thanks,
Matt Darland
mtd5922 AT omega DOT uta DOT edu
- Raw text -