I'm using Qt Creator 4.6.2 based on Qt 5.11.1 in Ubuntu 18.10 to C++ programming with CONFIG += console c++17
key in .pro
file and I got problem with following code:
std::for_each(attributes.begin(), attributes.end(), [&,i{0}](auto it) mutable {compressed.col_id[i] = it.first; i++;});
Qt Creator underlines this code in red and says "expected token ';' got '{'" but compiler runs this code without problems. Also when I tried to run this code:
int i = 0;
std::for_each(attributes.begin(), attributes.end(), [&](auto it) mutable {compressed.col_id[i] = it.first; i++;});
Qt Creator not underlined it.
I think it could be some problems with parsing in IDE so how I can deal with it?
Syntax Highlighting means using colors and fonts to help distinguish language elements in programming languages and other types of structured files. Programmers use syntax highlighting to understand code faster and better, and to spot many kinds of syntax errors more quickly.
To switch themes, select Edit > Preferences > Environment, and then select a theme in the Theme field. You can use the Qt Creator text and code editors with your favorite color scheme that defines how code elements are highlighted and which background color is used.
Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms.
The latest version of Qt is 6.3. 1 released on 14 June 2022.
Try to use the ClangCodeModel for C++. It might be experimental in your version but I´ve used it there as well. Might be slow though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With