Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: PLS CHECK IT OUT...............  (Read 3834 times)

0 Members and 1 Guest are viewing this topic.

m.ranjan24

    Topic Starter


    Starter

    PLS CHECK IT OUT...............
    « on: January 07, 2009, 11:48:00 AM »
    #include<iostream>
    #include<math.h>
    using namespace std;
    class calc
    {
     private :

     public :
       double  add(double ,double );
    }



    double calc:: add(double x ,double y)
    {
        double  sum=0;
        sum=a+b;
        return sum;
    }

    int main()
    {
      calc c1;
      int x;
      double a,b;
      do
       {
       cout<<"1. add";
       
       cout<<"enter ur choice ::::;";
       cin>>x;
            switch(x)
             {
              case 1:

                 double sum=0;
                 cout<<"enter 1st value::::";
                 cin>>a;
                 cout<<"enter the 2nd no.:::;";
                 cin>>b;
                 sum=( c1.add(a,b));
                 cout<<"value of sum is ::::"<<sum<<endl;
             }

       }
      while(1);

    }
    PLS REPLY ..............
         WATS MY FAULT .................

    m.ranjan24

      Topic Starter


      Starter

      pls hav a look .........
      « Reply #1 on: January 07, 2009, 11:55:05 AM »
      IS ther any 1 ...............
       pls help me out ...........

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: PLS CHECK IT OUT...............
      « Reply #2 on: January 07, 2009, 12:02:48 PM »
      with what? whats the problem? all I see here is a bunch of C++ code.
      I was trying to dereference Null Pointers before it was cool.