Article View: net.lang.c++
Article #269constructor declaration
From: Bennet Yee
Date: Thu, 24 Jul 1986 05:57
Date: Thu, 24 Jul 1986 05:57
15 lines
868 bytes
868 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
Technical Details
Message-ID:
<1016@g.cs.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!g.cs.cmu.edu!byeeShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!g.cs.cmu.edu!byee From: byee@g.cs.cmu.edu (Bennet Yee) Newsgroups: net.lang.c++ Subject: constructor declaration Message-ID: <1016@g.cs.cmu.edu> Date: Thu, 24-Jul-86 01:57:47 EDT Article-I.D.: g.1016 Posted: Thu Jul 24 01:57:47 1986 Date-Received: Thu, 24-Jul-86 21:37:44 EDT Distribution: na Organization: Carnegie-Mellon University, CS/RI Lines: 15