中国十大母婴用品品牌:急需知道答案!!!在线等待!!!谢谢

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 21:59:18
在c++中会有这样的情况,就是会有一些代码会用“[]”(中括号)括起来,我想问这个“[]”括号起到什么作用???是什么意思???谢谢!!!!
不是数组名后的,就是单独的一段,是用〔〕括起来的
例如:
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(666D02B7-61A7-4C0A-AB6A-DAFA661EBE97),
dual,
helpstring("Iactive1 Interface"),
pointer_default(unique)
]
interface Iactive1 : IDispatch
{
[propget, id(1), helpstring("property total")] HRESULT total([out, retval] long *pVal);
[propput, id(1), helpstring("property total")] HRESULT total([in] long newVal);
[id(2), helpstring("method sum")] HRESULT sum(long x,long y);
};

[
uuid(354D5733-BE95-4281-9690-E7A51C254455),
version(1.0),
helpstring("comtest 1.0 Type Library")
]
library COMTESTLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");

[
uuid(096E6486-C09F-492B-AF74-69C74FC8D6BB),
helpstring("active1 Class")
]
coclass active1
{
[default] interface Iactive1;
};
};

什么意思啊

参数,数组都用,不知道你要问哪些。