不允许使用限定名称 [英] qualified name is not allowed
问题描述
使用命名空间std;
typedef struct
{
tU16 u16AppID;
tU16 u16RegisterID;
tU16 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageDataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult>
_MessageDataForMethodResultExecuteTest;
};
我正在使用RVCT编译器(ARM)
>
using namespace std;
typedef struct
{
tU16 u16AppID;
tU16 u16RegisterID;
tU16 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageDataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult >
_MessageDataForMethodResultExecuteTest;
};
I am using RVCT compiler( ARM )
推荐答案
我忘了粘贴问题,
执行以下代码时(我删除的代码我不是
禁止发布)。我收到错误,因为合格的名字不是
允许在宣布auto_ptr对象的行。可以告诉我一些
告诉我是什么问题
5月15日下午2:43,hyderabadblues< sirishku ... @ gmail.comwrote:
I forgot to paste the problem,
While executing following code( I have removed code that Im not
suppossed to post).I am getting the error as qualified name is not
allowed at the line where an object of auto_ptr is declared.Can some
tell me what is the problem
On May 15, 2:43 pm, hyderabadblues <sirishku...@gmail.comwrote:
using namespace std;
typedef struct
{
t1616 u16AppID;
tU16 u16RegisterID;
t1616 u16CmdCounter;
t1616 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageD ataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult>
_MessageDataForMethodResultExecuteTest;
};
我正在使用RVCT编译器(ARM)
using namespace std;
typedef struct
{
tU16 u16AppID;
tU16 u16RegisterID;
tU16 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageDataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult >
_MessageDataForMethodResultExecuteTest;
};
I am using RVCT compiler( ARM )
On 15 Maj,14:43,hyderabadblues< sirishku ... @ gmail.comwrote:
On 15 Maj, 14:43, hyderabadblues <sirishku...@gmail.comwrote:
使用命名空间std;
typedef struct
{
t1616 u16AppID;
tU16 u16RegisterID;
t1616 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageDataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult>
_MessageDataForMethodResultExecuteTest;
};
我正在使用RVCT编译器(ARM)
using namespace std;
typedef struct
{
tU16 u16AppID;
tU16 u16RegisterID;
tU16 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageDataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult >
_MessageDataForMethodResultExecuteTest;
};
I am using RVCT compiler( ARM )
我不知道这是不是问题(因为我稍微修改了
版本在VC ++ 8上编译得很好)但是在C ++中你通常会这样宣布一个
结构:
struct Name
{
int members;
};
没有typedef。
-
Erik Wikstr ?m
I don''t know if this is the problem (since my slightly modified
version compiles just fine on VC++8) but in C++ you normally declare a
struct like this:
struct Name
{
int members;
};
with no typedefs.
--
Erik Wikstr?m
5月15日下午3:03,Erik Wikstr?m< eri ... @ student.chalmers.sewrote:
On May 15, 3:03 pm, Erik Wikstr?m <eri...@student.chalmers.sewrote:
在15 Maj,14:43,hyderabadblues< sirishku ... @ gmail.comwrote:
On 15 Maj, 14:43, hyderabadblues <sirishku...@gmail.comwrote:
using命名空间标准;
using namespace std;
typedef struct
{
t1616 u16AppID;
tU16 u16RegisterID;
t1616 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
typedef struct
{
tU16 u16AppID;
tU16 u16RegisterID;
tU16 u16CmdCounter;
tU16 u16FunctionID;
tU16 u16SourceSubID;
tU32 u32InternalData;
} trMessageDataForMethodResult;
} trMessageDataForMethodResult;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult>
_MessageDataForMethodResultExecuteTest;
class ExecuteTest
{
auto_ptr< trMessageDataForMethodResult >
_MessageDataForMethodResultExecuteTest;
};
};
我正在使用RVCT编译器(ARM)
I am using RVCT compiler( ARM )
我不知道如果这是问题(因为我稍微修改了
版本在VC ++ 8上编译得很好)但是在C ++中你通常会声明一个
结构,如下所示:
struct name
{
int member;
};
<没有typedef的
。
-
Erik Wikstr?m
I don''t know if this is the problem (since my slightly modified
version compiles just fine on VC++8) but in C++ you normally declare a
struct like this:
struct Name
{
int members;
};
with no typedefs.
--
Erik Wikstr?m
我也试过改变结构声明。但它没有
工作
I have also tried changing the structure declatration. but it didnt
worked
这篇关于不允许使用限定名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!