Click to See Complete Forum and Search --> : Global Variables?
lior6543
January 15th, 2005, 04:02 PM
I would like to create a global variables from the type of:
public: static System::Collections::ArrayList* ArInvoices = new ArrayList();
to access from all of my class and Forms.
lior6543
January 15th, 2005, 04:03 PM
I don't want to declear it in each class / form
Jinto
January 17th, 2005, 06:26 AM
Do what I do create a singleton class called let say CGlobals and stick all your globals in that. Then just include the globals class header file in each form u want access to that global.
lior6543
January 17th, 2005, 07:10 AM
how about some code please?
Andreas Masur
January 17th, 2005, 07:15 AM
Singleton pattern (http://home.earthlink.net/~huston2/dp/singleton.html)
Singleton C++ demos (http://home.earthlink.net/~huston2/dp/SingletonDemosCpp)
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.