Article View: alt.comp.lang.learn.c-c++
Article #360Arrays as static members
From: Magnus Hult
Date: Thu, 01 Jul 1999 00:00
Date: Thu, 01 Jul 1999 00:00
18 lines
1312 bytes
1312 bytes
Hello,
I've got a problem (again). Take a look at this:
class Object {
public:
int id;
static Object *pId[50];
};
How to allocate memory for those 50 static members? I can't make a loop
outside a function, and it doesn't feel right to write "Object
*Object::pId[n] = 0;" 50 times.
--
Magnus Hult
hult.holmstrom@swipnet.se
http://www.ovenproof.com
Technical Details
Message-ID:
<qQQe3.1601$nZ5.3455@nntpserver.swip.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8d38,aecd7aaa6e14dde4,start X-Google-Attributes: gidf8d38,public X-Google-Thread: 114592,aecd7aaa6e14dde4,start X-Google-Attributes: gid114592,public X-Google-Thread: 109fba,aecd7aaa6e14dde4,start X-Google-Attributes: gid109fba,public From: "Magnus Hult" <hult.holmstrom@swipnet.se> Subject: Arrays as static members Date: 1999/07/01 Message-ID: <qQQe3.1601$nZ5.3455@nntpserver.swip.net> X-Deja-AN: 496164767 X-Sender: s-274939@d212-151-240-2.swipnet.se X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 X-Complaints-To: news-abuse@swip.net X-Trace: nntpserver.swip.net 930863510 212.151.240.2 (Thu, 01 Jul 1999 23:11:50 MET DST) Organization: A Customer of Tele2 X-MSMail-Priority: Normal NNTP-Posting-Date: Thu, 01 Jul 1999 23:11:50 MET DST Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cpp.language,comp.lang.c++