Problem compiling my program.

Hi, I have this code that I am having problems with. Okay so my code is suppost to take a point, rotate it and tell me the new position of the point. Each time it does this it is suppost to replace the co-ordinate of the point rotated with the new point. I try to run my code and i Get the following error:
Error 1 error C3867: 'Point::get_x': function call missing argument list; use '&Point::get_x' to create a pointer to member d:\my documents\visual studio 2005\projects\a3q2\a3q2\assgn3q2.cpp 52
line 52: cout<< "The point is now " << p.get_x << "," << p.get_x << "\n";


#include <iostream>
#include <cmath>
#include "Point.h"
using namespace std;

void rotate(Point& p, double angle)
{
double new_x = (((p.get_x()*cos(angle))
+(p.get_y()*sin(angle))));
double new_y = (((-(p.get_x())*sin(angle))
+(p.get_y()*cos(angle))));
double dx = new_x- p.get_x();
double dy = new_y- p.get_y();
p.move(dx,dy);
}

int main()
{

cout<< "The original point p (5,5) rotated 5 times by 10 degrees then scaled 5 times by .95 is:""\n";
Point p(5,5);
double angle = 10;
double scale = .95;
int rotation_count = 0;
int scale_count = 0;


while (rotation_count<5)
{
rotate(p, angle);

cout<< "The point is now " << p.get_x << "," << p.get_x << "\n";
rotation_count++;
}


return 0;
}
Take a look at the line indicated and check your syntax. Remember, Point::get_x is a function, not a value.

Good luck.
Thnx for the help, it appears that im missing ().
Topic archived. No new replies allowed.