Article View: net.lang.c++
Article #275Re: constructor declaration
From: m.terribile
Date: Wed, 30 Jul 1986 16:19
Date: Wed, 30 Jul 1986 16:19
27 lines
1420 bytes
1420 bytes
> I've started playing with C++ & wrote the following:
>
> class hashtable {
> queue_t bucket[HASHSIZE];
> int (*hash_f)(char *);
> public:
> hashtable(int (*hf)(char *)) { hash_f = hf; }
> ...
> }
>
> but the compiler complains with syntax error at the declaration
> for the constructor (3 lines), and also then complains something
> about hf, type expected. What did I do wrong, O c++ wizards?
>
> -Bsy
Well, for one thing, inline function definitions must be followed by
a semicolon. This is one that your fingers will take a while to get
used to!
--
from Mole End Mark Terribile
(scrape .. dig ) mtx5b!mat
(Please mail to mtx5b!mat, NOT mtx5a!
mat, or to mtx5a!mtx5b!mat)
(mtx5b!mole-end!mat will also reach me)
,.. .,, ,,, ..,***_*.
Technical Details
Message-ID:
<1447@mtx5a.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!bellcore!whuxcc!lcuxlm!akgua!akguc!mtune!mtunf!mtx5c!mtx5d!mtx5a!matReferences:
<1016@g.cs.cmu.edu>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mtx5a.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!bellcore!whuxcc!lcuxlm!akgua!akguc!mtune!mtunf!mtx5c!mtx5d!mtx5a!mat From: mat@mtx5a.UUCP (m.terribile) Newsgroups: net.lang.c++ Subject: Re: constructor declaration Message-ID: <1447@mtx5a.UUCP> Date: Wed, 30-Jul-86 12:19:02 EDT Article-I.D.: mtx5a.1447 Posted: Wed Jul 30 12:19:02 1986 Date-Received: Thu, 31-Jul-86 18:40:11 EDT References: <1016@g.cs.cmu.edu> Distribution: na Organization: AT&T Information Systems, Middletown, NJ 07748-4801. Lines: 27