[Click] Sharing of Global variables
Pradeep Pradeep
pradeep_addada at yahoo.co.in
Wed Feb 11 23:15:46 EST 2009
Hi,
I am using sharing of variables between different elements. Explaining it I have declared an a variable in .cc file of an element A(as global), and re-declared it as extern variable in .hh files of other elements(B and C). I had no problems when I have just one object of these elements in my file.If I have multiple objects of theelements A,B,C and D how will the elements B and C know which variable to consider(I mean the glogal variable can be that declared in any one of multiple instances of that elementA.)
Example:
FromDevice(eth1)
->a1::A
->b1::B
->c1::C
->.........;
FromDevice(eth2)
->a2::A
->b2::B
->c2::C
->............
b1 and c1 should use the variable declared in a1 and b2 and c2 should use the variable declared in a2. Is that possible? It might be a C++ question.
Regards,
Krishna.
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
More information about the click
mailing list