Sunday 15 January 2012

c++ - Public Static Variable access -


I'm trying to expose a static variable. I have tried to use it only as a public static and access functions, but when I use the Stage :: Set Framework (this); In my framework class, or even if I do SystemFramework public and use stage :: systemFramework = it , I get:

framework.obj || Error LNK2001: Unsolved exotic symbol "Public: Framework of stable class * Stage :: System framework" (? SystemFramework @ Stage @@ 2PAVFramework @@a).

I'm not sure why this is not working. I'm clearly missing something, can anyone help please?

  #pragma once #include "event.h" #ifndef Framework class framework; #endif // Framework Square Stage {Secure: Static Framework * systemFramework; Public: // Static Framework * System Framework; // Step Control Virtual Zero Start () = 0; Pause virtual zero () = 0; Resume virtual zeros () = 0; Virtual zero expire () = 0; Virtual Zero Event (FwEvent * E) = 0; Virtual Zero Update () = 0; Virtual Zero Render () = 0; Fixed Zero Set Framework (Framework * Framework Object) {systemFramework = frameworkObject; }; / * Fixed Framework * GetFramework () {Return System Framework; }; * /};   

thanks

listing static Only the announces class members in a class they should still be defined wherever this definition should be one. Place in CPP file:

  Framework * Stage :: System framework;    

No comments:

Post a Comment