मैं जब नीचे कोड संकलन निम्न त्रुटियों हो रही है:<त्रुटि C2059: सिंटेक्स त्रुटि: 'निरंतर'> जब साथ संकलन स्थिरांक पूर्णांक
3>c:\hedge\hedge\hedge\AisTarget.h(22) : error C2059: syntax error : 'constant'
3>c:\hedge\hedge\hedge\AisTarget.h(22) : error C2238: unexpected token(s) preceding ';'
#if !defined(AisTarget_h)
#define AisTarget_h
#include "GeneralAviationItems.h"
#include <string>
namespace HEDGE {
using namespace GeneralAviation;
class AisTarget : public WaypointLatLon {
public:
static const int NO_DATA = -1000; //here is the error
};
} // end namespace HEDGE
#endif
आपकी '#if! परिभाषित' को' # ifndef' btw के साथ प्रतिस्थापित किया जा सकता है। – chris
यदि आप 'स्थिरांक int NO_DATA = -1000;' 'enum {NO_DATA = -1000} के साथ बदलते हैं, तो यह काम करता है;'? उस स्थिति में, आपके पास एक बहुत पुराना कंपाइलर है। कृपया हमें मत बताएं कि आप विजुअल स्टूडियो 6 का उपयोग कर रहे हैं ;-) – fredoverflow
यह कोड वास्तव में विमानन में उपयोग नहीं किया जा रहा है, है ना? दृश्य स्टूडियो 2008 एक्सप्रेस का उपयोग कर – stijn