C++/Eclipse CDT 代码补全问题(Wascana、mingw)

发布于 2024-09-27 22:08:41 字数 448 浏览 0 评论 0原文

我的 CDT 有问题。代码完成不适用于标准库类。 例如,在输入 x 后的这段代码中。并且按 ctrl+space IDE 不会显示 API 元素列表。

#include 
void f() {

 string x = "sss";
 x.
}

字符串和向量头文件位于 Includes 目录中。当我按 ctrl+单击包含行时,我将重定向到头文件。

代码完成似乎对于 C std 库工作得很好。

我的 eclipse 版本:

Eclipse IDE for C/C++ Developers
Version: Helios Release
Build id: 20100617-1415

Eclipse C/C++ Development Tools
Version: 7.0.0.201006141710
Build id: 201006141710

请帮忙。

I've a problem with my CDT. Code completion doesn't work for standard library classes.
For example in this code after entering x. and presing ctrl+space IDE doesn't display the list of API elements.

#include 
void f() {

 string x = "sss";
 x.
}

String and vector header files are available in Includes directories. When I press ctrl+click on the include line I'm redirected to header file.

Code completion seems to work fine for C std library.

My version of eclipse:

Eclipse IDE for C/C++ Developers
Version: Helios Release
Build id: 20100617-1415

Eclipse C/C++ Development Tools
Version: 7.0.0.201006141710
Build id: 201006141710

Please help.

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

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

发布评论

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

评论(1

邮友 2024-10-04 22:08:41

试试这个:

#include <iostream>
#include <string>
using namespace std;

int main ()
{
  string str ("Test string");
  cout << "The size of str is " << str.size() << " characters.\n";
  return 0;
}

首先:检查它是否编译,然后将光标放在“return”之前并尝试代码辅助:“str”。看看它是否弹出。

Try this:

#include <iostream>
#include <string>
using namespace std;

int main ()
{
  string str ("Test string");
  cout << "The size of str is " << str.size() << " characters.\n";
  return 0;
}

first: check whether it compiles, then place cursor before "return" and try code assist: "str." and see if it pops up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文