i get an error when trying to compile C++ source file where some headers are included. The error as written is expected identifier before 'enum'. The message in status bar says the problem is in a header file where the bellowed code is placed. Any solution?
1 2 3 4
enum BIRD_ERROR_CODES // the message points this line
{
BIRD_ERROR_MAXIMUM_VALUE
};
This can sometimes mean that there is something wrong with the code preceding this point in the file. Your "enum" looks fine, I would check the line of code right above it for any mistakes.
//*****************************************************************************//
//*****************************************************************************//
//
// Source: api\atm3dgm
//
// Author: crobertson
//
// Revision for ATC3DGm 7,0,0,0
//
//
// Date: 2002/02/19 13:27:58
//
// COPYRIGHT: COPYRIGHT ASCENSION TECHNOLOGY CORPORATION - 2000, 2001
//
//*****************************************************************************//
//*****************************************************************************//
#ifndef ATC3DGm_H // JPB bumper to prevent multiple-inclusion
#define ATC3DGm_H
usingnamespace ATC3DGm_H
#define CPLUSPLUS
#ifdef LINUX
#define ATC3DGm_API
#else
#ifdef DEF_FILE
#ifdef ATC3DGm_EXPORTS
#define ATC3DGm_API
#else
#define ATC3DGm_API
#endif
#else
#ifdef CPLUSPLUS
#ifdef ATC3DGm_EXPORTS
#define ATC3DGm_API __declspec(dllexport)
#else
#define ATC3DGm_API __declspec(dllimport)
#endif
#else
#ifdef ATC3DGm_EXPORTS
#define ATC3DGm_API extern "C" __declspec(dllexport)
#else
#define ATC3DGm_API extern "C" __declspec(dllimport)
#endif
#endif
#endif
#endif
/*****************************************************************************
ENUMERATED CONSTANTS
*****************************************************************************/
//*****************************************************************************
//
// ERROR MESSAGE format is as follows:
// ===================================
//
// All commands return a 32-bit integer with the following bit definitions:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +-+-+-+-+-+-+-----------+-------+-------------------------------+
// |E|W|X|R|B|M| Reserved |Address| Code |
// +-+-+-+-+-+-+-----------+-------+-------------------------------+
//
// where
//
// E - indicates an ERROR
// (Operation either cannot or will not proceed as intended
// e.g. EEPROM error of some kind. Requires hardware reset
// of system and/or replacement of hardware)
// W - indicates a WARNING
// (Operation may proceed but remedial action needs to be taken
// e.g. Sensor has been removed. Fix by replacing Sensor)
// X - indicates Transmitter related message
// R - indicates Sensor related message
// (If neither X nor R is set then the message is a SYSTEM message)
// B - indicates message originated in the BIRD hardware
// M - indicates there are more messages pending (no longer used)
//
// Address gives the index number of the device generating the message
// (Driver and system messages always have address 0)
//
// Code - is the status code as enumerated in BIRD_ERROR_CODES
//
//*****************************************************************************
enum BIRD_ERROR_CODES // the message points this line
{
BIRD_ERROR_MAXIMUM_VALUE
};