PotatoeMaster
PotatoeMaster

Reputation: 125

C++ Code::Blocks Autocomplete Not Working

I just recently started learning C++ with Code::Blocks. When I first started using it, the autocomplete worked fine, but now it doesn't for some reason. What I mean by autocomplete is this:

#include <iostream>
using namespace std;

int main(){
    int test;
}

If I were to type "te" (without the quotes), I wouldn't get a box that has the name of my variable in it. Any help would be appreciated.

Upvotes: 11

Views: 38197

Answers (6)

I have discovered that using new C++ function header style will broke the code completion in code::blocks IDE.

The solution to recovery broken code completion is to use only the old C++ function header declaration.

// new function declaration
auto f() -> void; // will not work with cb cc
// classic function declaration
void f(void); // will work

Upvotes: 0

Istiak Ahmed Khan
Istiak Ahmed Khan

Reputation: 1

changing maximum allowed parser per project to 2 worked for me,go to setting>editor>code completion

Upvotes: 0

I think it might be good to know that for some versions, you need to close your Code::Blocks program and open it again so these changes of settings become effective.

Upvotes: 0

Shubhzgang
Shubhzgang

Reputation: 324

In the Editor settings, change the value of autolaunch after typing # letters from 3 to 2.

Upvotes: 2

user117127
user117127

Reputation: 111

Check settings. Settings > Editor > General Settings > Editor Settings > Code Completion > Check [Code Completion]

Upvotes: 0

Bogdan
Bogdan

Reputation: 511

Disabling SmartSense (settings/editor/code completion) can resolve the problem. With SmartSense enabled (default) code completion work partially.

Upvotes: 15

Related Questions