Let's make as if I have in all 5 files in my c++ program.
X.hpp, Y.hpp, X.cpp, Y.cpp, main.cpp
Class X doesn't have any data members(variables). Class Y uses a method (to do some calculation) found in class X ( let's call it myX(int ) ) and this method returns a value to class Y.
I do this in my constructor in Class Y:
where number is a data member in class Y.
So that means that class X won't have a struct right?
If class X doesn't have any struct, how do i use the function myX in class Y??