Sebastian Dusza
Sebastian Dusza

Reputation: 2528

C++/Eclipse CDT code completion problem (Wascana,mingw)

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.

Upvotes: 0

Views: 1198

Answers (1)

PF4Public
PF4Public

Reputation: 694

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.

Upvotes: 1

Related Questions