- 论坛徽章:
- 0
|
我前两天想找一个二进制文件编辑器,google出hexed这个sf上的开源项目,觉得正适合我的需要.
我下载了源代码,按照指示编译,结果编译器抛出形如 ISO C++ forbids declaration of `stOk' with no type的错误,我看了代码,原来代码是这么写的.
我觉得这个很疯狂,但是我不敢确定它是错误的代码,因为编译器的error message也只是说ISO C++禁止这种声明.
那么请问,什么方言允许这种声明?怎么在g++里使用该方言的特性?
static const stOk = 0; // things are allright
static const stInitError = 1; // error initializing the stream
static const stReadError = 2; // error reading from the stream
static const stWriteError = 3; // error writing to the stream
static const stGetError = 4; // get found not registered class
static const stPutError = 5; // put found not registered class
static const stMemoryError = 6; // not enough memory
static const stStoreError = 7; // No Store method
static const stLoadError = 8; // No load method or error in Load
static const stCopyError = 9; // CopyFrom: error of source stream
static const stSeekError = 10; // error using Seek, GetPos etc.
static const stResetError = 11; // Could not reset stream
static const stReadTimeout = 12; // Timeout on read (CharacterStream only)
static const stWriteTimeout = 13; // Timeout on write (CharcterStream only)
[ 本帖最后由 lipingtababa 于 2008-10-31 12:49 编辑 ] |
|