hi,
if i hav member variables of a say class A defined and initialized in a class A how do i access its variables in a classB which is in diff file
ridhimasatam
0
Newbie Poster
Recommended Answers
Jump to PostUsually you are supposed to have 2 files per class.
Header file: ClassName.h, which declares the class interface.
Source file: ClassName.cxx/cpp/.. which defines the class. I.e. has implementation for the class's interface.Assuming you have A.h and A.cpp, to use A's variables in another class B, you'll have to …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.