User forums > Help
function call without parentheses
(1/1)
Feno:
Hello, I am starting to use this IDE and in C++ programming. It's been several times that I've been fooled when calling a function: the IDE offers me the available functions and when I select one it does not add the parentheses and therefore generates an error. The question is if I didn't correctly configure the IDE to add the parentheses to the function call. Otherwise it is clear that I would think about it from now on ;). thank you for your help and have a nice day
Pecan:
Settings=>Editor=>CodeCompletion=>Add parenteses after function completion
Feno:
Hello, Thanks for your help. The line was already checked. I unchecked it, then after validation I restarted CODES//BLOCK. Then I re-checked the line then validated and restarted again, nothing worked! Let me re-explain the case where I expect the parentheses to be placed automatically: If I have a class P1 and a display() function, if I do "P1.display()", I expect that CODE//BLOCK places what it offers me: display(). And that's not the case...
Pecan:
--- Quote from: Feno on November 17, 2022, 07:34:11 am ---Hello, Thanks for your help. The line was already checked. I unchecked it, then after validation I restarted CODES//BLOCK. Then I re-checked the line then validated and restarted again, nothing worked! Let me re-explain the case where I expect the parentheses to be placed automatically: If I have a class P1 and a display() function, if I do "P1.display()", I expect that CODE//BLOCK places what it offers me: display(). And that's not the case...
--- End quote ---
The CodeCompletion plugin is quite old and out of date with newer C++ compilers.
A newer code completion plugin is available and will soon be contained in the nightly builds. See: https://forums.codeblocks.org/index.php/board,20.0.html
However you can obtain and install the newer plugin by following the directions at https://forums.codeblocks.org/index.php/topic,25147.msg171509.html#msg171509
The newer plugin (clangd_client) requires that the clangd executable be available on your system. See: https://wiki.codeblocks.org/index.php/CB_Clangd_Client
It also requires that you install the nightly build, see https://forums.codeblocks.org/index.php/topic,25147.msg171487.html#msg171487 for install instructions.
It's easy. Everything but a compiler toolchain and cland.exe is contained in the nightly build. Try it.
Navigation
[0] Message Index
Go to full version