home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!undergrad.math.waterloo.edu!mobius10.math.uwaterloo.ca!wgsteven
- From: wgsteven@mobius10.math.uwaterloo.ca (Warren Stevens)
- Subject: Need access to array index in ctor
- Message-ID: <C1A1nx.K2L@undergrad.math.waterloo.edu>
- Sender: news@undergrad.math.waterloo.edu
- Organization: University of Waterloo
- Date: Fri, 22 Jan 1993 22:40:44 GMT
- Lines: 13
-
- I am creating a class, called block, that needs to know it's index in a
- constructor if it is created as part of an array. For instance,
-
- House block[512];
-
- would call block::block() 512 times. Each time the constructor is called,
- i need to know what the index being created is.
-
- Is there some way to do this easily?
-
- Thanks,
-
- Warren
-