Y
yogi_bear_79
I am working on a lab with my first exposure to classes. With help
from this group I have completed my point class, and now I am working
on this one, this is what I have so far, but I am running into the
subject error, on my getSlope function. I am very much a beginner,
distant-learning self taught, and a system admin, not a programmer by
trade,
#include<iostream>
#ifndef h_Line
#define h_Line
#include "Point.h"
class Line
{
Point a, b;
public:
Line(const Point& a, const Point& b);
double getSlope(const Point& a, const Point& b);
};
inline Line::Line(const Point& a, const Point& b){}
inline double Line::getSlope(const Point& a, const Point& b)
{
return (&b.getY - &a.getY)/(&b.getX - &a.getX);
}
#endif
from this group I have completed my point class, and now I am working
on this one, this is what I have so far, but I am running into the
subject error, on my getSlope function. I am very much a beginner,
distant-learning self taught, and a system admin, not a programmer by
trade,
#include<iostream>
#ifndef h_Line
#define h_Line
#include "Point.h"
class Line
{
Point a, b;
public:
Line(const Point& a, const Point& b);
double getSlope(const Point& a, const Point& b);
};
inline Line::Line(const Point& a, const Point& b){}
inline double Line::getSlope(const Point& a, const Point& b)
{
return (&b.getY - &a.getY)/(&b.getX - &a.getX);
}
#endif