I am trying to create this class in C++ but the compiler keeps giving me a syntax error at it's declaration. The global variables are necessary.
This is the error message
include\SInterface.h(36) : error C2061: syntax error : identifier 'SInterfaceClass'
#ifndef __SINTHDR__
#define __SINTHDR__
#include "Global.h"
typedef unsigned int uint;
typedef struct
{
float d1;
float d2;
float d3;
float d4;
float para;
float mode;
} DeflStruct;
// Simulation Inputs
// ====================================================================
float SimAcc [3] = {0};
float SimGyr [3] = {0};
//
// More Global floats being defined here
//
float SimOutPara = 0 ;
float SimOutMode = 0 ;
class SInterfaceClass { // line 36
private:
float ITime;
float IPrevTime;
//
// More floats being defined here
//
float Ic1_bf_psi_rate;
float Ic1_bf_phi_rate;
public:
SInterfaceClass();
DeflStruct Output(
Vect3 Acc ,
Vect3 Gyr ,
double Pre ,
Vect3 Vel ,
Vect3 Eul ,
Vect3 Inc ,
Vect3 Pos ,
double Time);
};
#endif
typedef structinstead of juststruct? - Bartek BanachewiczGlobal.h? - zero298Global.hhappily passes the marked line without error and continues on until theVect3members, where are of course not valid because there is noGlobal.h. - WhozCraig