问题
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.
回答1:
Disabling SmartSense (settings/editor/code completion) can resolve the problem. With SmartSense enabled (default) code completion work partially.
回答2:
Check settings. Settings > Editor > General Settings > Editor Settings > Code Completion > Check [Code Completion]
回答3:
In the Editor settings, change the value of autolaunch after typing # letters
from 3 to 2.
回答4:
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.
来源:https://stackoverflow.com/questions/28422023/c-codeblocks-autocomplete-not-working