J
JustSomeGuy
I have two classes, class english and class metric.
I seem to be having dificulty getting this to compile properly...
I'm using powerpc-apple-darwin8-g++-4.0.0
There are 5 files, main.cpp english.cpp english.h metric.h and metric.cpp
They really don't do anything in this example except demonstrate the
structure of my application, and hopefully the compiler errors I'm
experiencing.
error: expected type-specifier before 'english' metric.h:21
// metric.h
#ifndef METRIC_H
#define METRIC_H
#include "english.h"
class metric
{
private:
float kilometersperhour;
public:
operator english();
};
#endif
// english.h
#ifndef ENGLISH_H
#define ENGLISH_H
#include "metric.h"
class english
{
private:
float milesperhour;
public:
operator metric();
};
#endif
// english.cpp
#include "english.h"
english:perator metric()
{
metric m;
return(m);
}
// metric.cpp
#include "metric.h"
metric:perator english()
{
english e;
return(e);
}
I seem to be having dificulty getting this to compile properly...
I'm using powerpc-apple-darwin8-g++-4.0.0
There are 5 files, main.cpp english.cpp english.h metric.h and metric.cpp
They really don't do anything in this example except demonstrate the
structure of my application, and hopefully the compiler errors I'm
experiencing.
error: expected type-specifier before 'english' metric.h:21
// metric.h
#ifndef METRIC_H
#define METRIC_H
#include "english.h"
class metric
{
private:
float kilometersperhour;
public:
operator english();
};
#endif
// english.h
#ifndef ENGLISH_H
#define ENGLISH_H
#include "metric.h"
class english
{
private:
float milesperhour;
public:
operator metric();
};
#endif
// english.cpp
#include "english.h"
english:perator metric()
{
metric m;
return(m);
}
// metric.cpp
#include "metric.h"
metric:perator english()
{
english e;
return(e);
}