User forums > General (but related to Code::Blocks)

Auto brackets for built in function is not working in cpp

(1/3) > >>

ahs_58:
Auto brackets after built in function in c++ was working fine when I  was using older version of codeblocks. But after installing latest version (20.03) of codeblock I need to press brackets manually.Let me clarify the matter with an example:

say I want to use sort() function for sorting a array:

In older version I just wrote sort and press ENTER key then I got like this

write sort  [Press ENTER key]  sort()

but in new version I need to press opening bracket key after writing sort
example:

write sort   [Press opening first braket key]  [Press ENTER key]   sort()


How to solve this problem? How to get old version feature that I have described above in my new codeblocks?

Thanks In Advance  :)

oBFusCATed:
There is a setting for this. Are you sure it is still enabled?

ahs_58:
Can you tell me exactly what that setting is?I don't know about this.

oBFusCATed:
Something related to braces and completion :)
There are two settings related to this and I'm not sure which one is the one you need.
Inspect the Settings -> Editor.

p.s. I don't use this so I cannot help you more. But we have not removed it.

huycan:
Let me reiterate what the OP means to say.

The problem is with the Code completion. There is an option "Add parentheses after function name auto completion" when checked, parentheses are automatically added to the function name. It worked in the past version of CB. But starting with 20.03 and all the nightly builds, it stops working.

For example, if I start typing "std:abs" ... the Code completion will give me a list of choices and after I choose (let say the first one), it will display in the editor "std::abs" (for the 20.03 ver)... but in the past, CB 17 and older... the display will be "std::abs()" ... Notice the parentheses...

Edit: This bug only happens under Windows... Linux working fine...

Navigation

[0] Message Index

[#] Next page

Go to full version