Object Oriented Programming Issues Error C3867

I am trying to create a program that calculates the area perimeter distance ect of a pool and you enter the number of corners and the co-ords of each corner. I am trying to do thr first section called obtain but its not working in the main function D: I don't know what to do!! I've checked loads of online tutorials and my own notes but im at a loss please help!

#include <iostream>
#include <cmath>

using namespace std;

class Pool
{
private:
int x[100];
int y[100];
int c;
int depth;
int i;

public:
void Obtain(void);
};

void Pool::Obtain()
{
int x[100], y[100], depth, c, i, N;


cout << "Depth:" << " ";
cin >> depth;

cout << "You have entered:" << " " << depth << "m" << endl;

cout << "No. of Corners" << " ";
cin >> c;
cout << " You have entered" << " " << c << " " << "corners" << endl;

for (i = 0; i < c; i++)
{
N = 1;
N += i;
cout << "Enter Corner" << " " << N << "."<<" ";
cin >> x[i] >> y[i];

cout << "You have entered" << " " << x[i] << "," << y[i] << endl;

}

}
int main()
{

int x[100], y[100], c, i, depth;

Pool my_pool;
my_pool.Obtain;

system("pause");
}
morning.
You don't call a function like:
my_pool.Obtain;
you call it like this:
my_pool.Obtain();


edit:
also this line in main() :
 
int x[100], y[100], c, i, depth;

is not needed as you seem to have variables for these in your Obtain() function.
Last edited on
Topic archived. No new replies allowed.