错误 C2143:缺少 ';'在'->'之前

发布于 2024-12-29 13:17:44 字数 248 浏览 3 评论 0原文

我在这里和互联网上进行了搜索,似乎没有人遇到与我类似的问题,我不太明白为什么我不能让它工作。

阻止我编译的行是:

LitCiterCommon::LitCiterTrace->Init();

如果我从不同的文件(c#)调用 LitCiterTrace.Init() ,它编译得很好,但由于某种原因,我无法从托管 cpp 调用它。

有什么想法或建议吗?

I've searched here and the internet and no one seems to be having a similar problem to me and I can't quite figure out why I cannot get this to work.

The line that is preventing me from compiling is:

LitCiterCommon::LitCiterTrace->Init();

If I call LitCiterTrace.Init() from a different file (c#) it compiles just fine, but for some reason I cannot call it from managed cpp.

Any ideas or suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相思碎 2025-01-05 13:17:44

如果 Init静态那么它与 C++ 中的方法没有任何不同

// this is no different than calling a static member method in C++
LitCiterCommon::LitCiterTrace::Init();

If Init is a static method then it would not be any different than in C++:

// this is no different than calling a static member method in C++
LitCiterCommon::LitCiterTrace::Init();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文