by Dinesh Thakur Category: Classes in C++


# include <iostream.h>

# include <stdlib.h>
# include <math.h>
# include <conio.h>
class student
                  int rn (int);
                  double fees (double);
            int student:: rn (int r)
                int ans;
                ans=abs (r);
                return (ans);
              double student::fees (double f)
              double ans;
              ans=fabs (f);
              return (ans);
          void main ( )
             clrscr ( );
             student st;
             cout <<"\n Absolute value of -12 is "<<st.rn (-12);
             cout <<"\n Absolute value of -12.4142 is "<<st.fees (-12.4142);

Overload Member Function Of A Class

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles