SNYP40A1
June 21st, 2008, 04:21 AM
I have a class, call this class 'A', which is part of a C++ project that I am working on for a homework assignment. Currently, my project compiles fine. However, if I add one static variable to class A, even if it is not referenced anywhere else other than as a variable declaration in the class header file, I get several linking errors about the declaration being multiply defined. In fact, I get errors stating that the variable was first defined in another class which inherits from a class included in the header file that class A includes. Is there some kind of cyclic dependency going on? I would post code, but I am not allowed to.