Hi, :hello:
So I've decided myself to grab the bull by the horns and attack the delicate matter of classes interdependancy.
(Of course) I'm encountering (expected) difficulties. In the following example I'm trying to extract the "guidance" program from "main.cpp" to a "guidance.cpp". "Sigma_Stg1.h" is the name of the main header.
First I need to create a "guidance.h" header file. Well. So here it is :
That compiles without errors. Well again.
Troubles arise from "Guidance.cpp", that hits the 100 errors mark. Seems it doesn't recognize variables or even Orbiter functions. Here's "Guidance.cpp" :
So, if someone can help me to get on track, thanks a lot. I know it is a difficult matter difficult to explain, but I absolutely need to get there to finish my projects. :tiphat:
So I've decided myself to grab the bull by the horns and attack the delicate matter of classes interdependancy.
(Of course) I'm encountering (expected) difficulties. In the following example I'm trying to extract the "guidance" program from "main.cpp" to a "guidance.cpp". "Sigma_Stg1.h" is the name of the main header.
First I need to create a "guidance.h" header file. Well. So here it is :
Code:
#ifndef __GUIDANCE_H
#define __GUIDANCE_H
#include "Sigma_Stg1.h"
#include "Orbitersdk.h"
class Guidance
{
public:
Guidance(void);
~Guidance(void);
void GuidanceProgram();
private:
};
#endif
That compiles without errors. Well again.
Troubles arise from "Guidance.cpp", that hits the 100 errors mark. Seems it doesn't recognize variables or even Orbiter functions. Here's "Guidance.cpp" :
Code:
#include "math.h"
#include "stdio.h"
#include "Guidance.h"
#define ORBITER_MODULE
// --------------------------------------------------------------
// Module initialisation
// --------------------------------------------------------------
DLLCLBK void InitModule (HINSTANCE hModule)
{
}
// --------------------------------------------------------------
// Module cleanup
// --------------------------------------------------------------
DLLCLBK void ExitModule (HINSTANCE hModule)
{
}
void Guidance::GuidanceProgram()
{
... blah blah blah...
};
So, if someone can help me to get on track, thanks a lot. I know it is a difficult matter difficult to explain, but I absolutely need to get there to finish my projects. :tiphat: