What happens if non static members are used in static member function?
What happens if non static members are used in static member function? Correct Answer Compile time error
There must be specific memory space allocated for the data members before the static member functions uses them. But the space is not reserved if object is not declared. Hence only if static members are not used, it leads to compile time error.
মোঃ আরিফুল ইসলাম
Feb 20, 2025