hi
i am trying to run this prog. on classes but the compiler is showing error in line 33.---i am not able to get that
plz help
/*1. Make a class called "point" with two integer data members x and
y. Show how to create and use two points p1 and p2.*/
#include <iostream>
using namespace std;
class point
{
public:
int x;
int y;
int sum(int,int);
};
int point::sum(int a,int b)
{
cout << "enter any 2 integers";
cin >> a >> b;
x = a;
y = b;
return(x+y);
}
int main()
{
int s;
point D;
s = D.sum(int a,int b); //this is error line
cout<<s;
return 0;
}