how to access
-
i have 2 files a.cpp and b.cpp i want to use the variable (suppose int x) which is public in .cpp1 in .cpp2(means i want to asign the value in d=x in cpp2).then how i can acess the value x in cpp2 :laugh: . remember cpp2 is a class cpp1 is cpp1 is a class derived publilicly from ccdialog
-
i have 2 files a.cpp and b.cpp i want to use the variable (suppose int x) which is public in .cpp1 in .cpp2(means i want to asign the value in d=x in cpp2).then how i can acess the value x in cpp2 :laugh: . remember cpp2 is a class cpp1 is cpp1 is a class derived publilicly from ccdialog
If
x
is a member of thecpp1
class (what a bad name for a class) the you must have access to an instance of thecpp1
class in order to gain access tox
. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]