C++变量声明

int* a=0,b,c;//这里a被声明为指针,而b,c则为int变量,不是指针!

pro*c变量声明的问题

05-22

文件内容rn#include "test.h"rnrnEXEC SQL BEGIN DECLARE SECTION;rntypedef int ID;rnEXEC SQL END DECLARE SECTION;rnint main(argc,argv)rnint argc ;rnchar**argv;rnrn rn EXEC SQL BEGIN DECLARE SECTION;rn ID LN_SERV_ID;rn EXEC SQL END DECLARE SECTION;rn EXEC SQL rn SELECT 1 rn INTO :LN_SERV_IDrn FROM dual;rn rn return 1; rnrnrn目前想把rnEXEC SQL BEGIN DECLARE SECTION;rntypedef int ID;rnEXEC SQL END DECLARE SECTION;rn移至test.h文件中rn但是移至后预编译提示如下rnrnPro*C/C++: Release 8.1.7.0.0 - Production on Mon May 22 14:54:03 2006rnrn(c) Copyright 2000 Oracle Corporation. All rights reserved.rnrnSystem default option values taken from: /data/oracle/oracle/product/8.1.7/precomp/admin/pcscfg.cfgrnrnSyntax error at line 9, column 2, file test.pc:rnError at line 9, column 2 in file test.pcrn ID LN_SERV_ID;rn.1rnPCC-S-02201, Encountered the symbol "ID" when expecting one of the following:rnrn auto, char, const, double, enum, extern, float, int, long,rn ulong_varchar, OCIBFileLocator OCIBlobLocator,rn OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,rn OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,rn short, signed, sql_context, sql_cursor, static, struct,rn typedef, union, unsigned, utext, uvarchar, varchar, void,rn volatile, a typedef name, a precompiled header, exec oracle,rn exec oracle begin, exec, exec sql, exec sql begin,rn exec sql end, exec sql type, exec sql var, exec sql include,rnThe symbol "enum," was substituted for "ID" to continue.rnrnError at line 0, column 0 in file test.pcrnPCC-F-02102, Fatal error while doing C preprocessingrnrn--------------rn若何修改才能正确?rnrn同时想知道为什么在红帽 linux9必须有rnEXEC SQL BEGIN DECLARE SECTION;rn ID LN_SERV_ID;rn EXEC SQL END DECLARE SECTION;rn这样的声明。rn我在hpunix下就不需要这个的,有什么配置控制吗?rn 论坛

没有更多推荐了,返回首页