Skip to main content

Thread: [C++] use of enum without previous declaration


hey, i'm maintaining code, , g++ doesn't way written.
need bit of figuring out best way fix problem.
keep getting error:

error: use of enum ‘cmlevent’ without previous declaration

code (i cut out unimportant parts) error line:

code:
#ifndef _cmltypes_h  #define _cmltypes_h    #include "tw_cml_api.h"    #include "cmldaycount.h"  #include "cmlexceptions.h"  #include "cmltypebase.h"   enum cmlevent //this line error;    /* const cmlcalc declarations used here */    enum cmlsecclass  {      s_null,      s_bond,      s_zbond,      s_discount,      s_floatingratenote,      s_indexlinkedbond,  };    enum cmlanalytics  {      a_priceyield=1,      a_accrual,      a_cashflow,      a_horizonreturn,      a_costofcarry,      a_optionadjustedspread,      a_sensitivity,      a_volatility,  };    enum cmlpriceformat  {      p_decimal,      p_32nd,      p_defaultofcurrency  };    enum cmltradingbasis  {      tb_price,      tb_yield,      tb_discountrate,      tb_spread,      tb_oas,  };    enum cmlyieldcurvetype  {      parcurve,      spotcurve,  };      #endif    //_cmltypes_h

the question here is: line supposed do?

if aim declare "enum" without elements, add braces:
code:
enum foo {};


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [C++] use of enum without previous declaration


Ubuntu

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial