home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!torn!nott!cunews!revcan!balsam!uuisis!tanda!marc
- From: marc@tanda.isis.org (Marc Thibault)
- Newsgroups: comp.lang.c++
- Subject: Re: build an array of * to functions
- Message-ID: <137825046DN5.61R@tanda.isis.org>
- Date: Sat, 23 Jan 93 11:22:08 EST
- References: <2514@itexjct.jct.ac.il>
- Reply-To: marc@tanda.isis.org
- Distribution: na
- Organization: Thibault & Friends
- Lines: 40
-
- In article <2514@itexjct.jct.ac.il>
- (Yoel Gurfinkel) writes:
- > But i don't know how to build an aray of 2 dimesions
- > sign + pointer to his function(with variables).
-
- thing (*fArray[size])(thing);
-
- - defines an array of "thing function(thing)" pointers. These
- can also be initialized as in:
-
- void (*funcPtrs[])(Cl) = {leaveF, showB, fxor, showM};
-
- where leaveF would be declared as "void leaveF(Cl)".
-
- By extension, it seems that a two-dimensional array could be
- defined as
-
- thing (*fArray[rows][cols])(thing);
-
- I haven't tried it but it seems the right thing to do.
-
- Cheers,
- Marc
-
- ---
- Marc Thibault | Automation Architect | All we are saying
- marc@tanda.isis.org | R.R.1, Oxford Mills, | is give global
- CIS:71441,2226 | Ontario, Canada K0G 1S0 | warming a chance.
- NC FreeNet: aa185 | |
-
- -----BEGIN PGP PUBLIC KEY BLOCK-----
- Version: 2.0
-
- mQBNAiqxYTkAAAECALfeHYp0yC80s1ScFvJSpj5eSCAO+hihtneFrrn+vuEcSavh
- AAUwpIUGyV2N8n+lFTPnnLc42Ms+c8PJUPYKVI8ABRG0I01hcmMgVGhpYmF1bHQg
- PG1hcmNAdGFuZGEuaXNpcy5vcmc+
- =HLnv
- -----END PGP PUBLIC KEY BLOCK-----
-
-
-