So this is just the beginning of my questions, but I'm seriously having problems using classes in C++, I'm writing a program right now to plot points using asterisks on a 40 by 40 plain. right now I'm just trying to write the .h for the point class and i cant even get that to compile.
heres what I have followed by errors I'm receiving... any help in regards to classes or just help with the errors will be appreciated.
#ifndef POINT_H
#define POINT_H
#include <iostream>
#include "arrayholder.h"
class Point{
public:
Point(): x(0.0), y(0.0), next() {};
void addPoint( char a[][] );
private:
double x;
double y;
Point* next;
};
#endif
and my arrayholder.h file
#ifndef ARRAYHOLDER_H
#define ARRAYHOLDER_H
#include <iostream>
using namespace std;
#include "rectangle.h"
#include "point.h"
class arrayholder{
private:
char a[40][40];
Point* listpointer;
public:
char** initarray();
void printRect();
void printPoints();
};
#endif
In file included from point.h:13:
arrayholder.h:22: error: ISO C++ forbids declaration of `Point' with no type
arrayholder.h:22: error: expected `;' before '*' token
I'm getting the same two errors for rectangle.h