|
From: | jk |
Subject: | Re: undefined error message for static variable during link phase |
Date: | Sat, 29 Jan 2005 23:52:31 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 |
jk wrote:
struggling with C++ I run into an error which I do not understand. see the attached files the static variable foo1 is being declared undefined during link phase. the various messages are in File undefErrMsg.txtI have an example from "goto Objekt Orientierung" by Herold/Klar/Klar (Addison Wesley) which exactly allows this kind of use of a "static" variable
Soorryyy - I found the mistake: I have to define int CFoo::foo1 = 0 ; somewhere outside class definition ;(( -- ================= lat=52.35°N - lon=10.25°E ====================== http://www.ibk-consult.de
[Prev in Thread] | Current Thread | [Next in Thread] |