Message-ID: <37B05611.F88183AB@geocities.com> From: Sahab Yazdani X-Mailer: Mozilla 4.51 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: static class members Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 10 Aug 1999 12:40:49 -0400 NNTP-Posting-Host: 209.5.18.105 X-Complaints-To: abuse AT sprint DOT ca X-Trace: newscontent-01.sprint.ca 934303258 209.5.18.105 (Tue, 10 Aug 1999 12:40:58 EDT) NNTP-Posting-Date: Tue, 10 Aug 1999 12:40:58 EDT Organization: Sprint Canada Inc. Lines: 20 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com why is it that my static class members are not accessable by other non-static class members. It compiles fine but then gives me an linker error. ie. class Foo { private: static int red; public: Foo(); }; Foo::Foo() { red=0; } this will cause linker error. Is there anyway to get around this?? WITHOUT moving the data members out of the class