C++ Code::Blocks Autocomplete Not Working
Asked Answered
P

6

11

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.

Perak answered 10/2, 2015 at 0:24 Comment(1)
does this answer your question: https://mcmap.net/q/1016693/-auto-complete-in-codeblocks ? If not then please update question saying that you tried "Reparse project" etc. and it still doesn't workHurryscurry
U
14

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

Uriisa answered 20/8, 2015 at 20:38 Comment(3)
can confirm that disabling smartsense enabled code-completionAffenpinscher
I wonder why this is enabled by default, if it destroys half of the reason to use an IDE.Fulfil
I am using Code blocks version 16.01. I don't have the option SmartSense in the mentioned area. And I can't solve my problem. :(Power
A
2

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

Amery answered 12/8, 2018 at 9:21 Comment(0)
A
0

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

Alter answered 25/4, 2017 at 20:20 Comment(0)
K
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.

Kall answered 7/11, 2018 at 8:16 Comment(0)
O
0

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

Ostrowski answered 28/7, 2021 at 17:24 Comment(0)
K
0

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
Knoll answered 16/12, 2023 at 15:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.