【发布时间】:2012-09-23 06:25:36
【问题描述】:
在我的代码中,这绝对没问题:
class __declspec(uuid("842E12D3-1F2C-435D-8426-BE42150AF4DB")) guid;
但不是传递一个 staitc 值,我想传递这样的东西,但它给出了编译错误:
string result("64ca9bdb-08d2-45f7-c526-8fcaa8d5abd1");
class __declspec(uuid(result)) guid;
//"result" will have dynamic value and that's why want to pass it a variable rather than hard coding the value
有人可以建议我如何实现这一点。
谢谢, 萨南
【问题讨论】: