13

Base class's variables not accessible????

view full story
linux-howto

http://www.unix.com – Hi friends, The derived class cannot access the base class's variables in my program. You can have a look at my code, I am actually using class templates. Code: #include <iostream> using namespace std; template <class T> class Sum {     friend void Check(Sum &s, T a, T b) {     T x, y;     x = (a > 0 && a <= 10000) ? a : 0;     y = (b > 0 && b <= 10000) ? b : 0;     s.Write(x, y); }   public:   Sum();   void Read();   private:   T sum;   void Write(T, T); &nb (HowTos)