News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Cant get code completion to work..is there anything special one needs to do?

Started by lenkite, December 07, 2005, 07:04:04 PM

Previous topic - Next topic

lenkite

I have a very simple cpp program with a '#include <iostream>'. I type 'cin.' and hit ctrl-space and nothing happens.  :(  Same thing for any of the standard library classes like vector, et al. I am using CodeBlocks 1.0 RC2.

I had a look at Settings > Plugin Settings > Code Completion, but didn't see any settinsgs which would fix the roblem.

All help appreciated!

thomas

Three things:

1. Code completion only scans files stored on the hard disk (i.e. you must save before code complete can work)
2. Code completion does not work properly without a project (in particular "find declaration" or "swap header/source")
3. Code completion does not work at all with standard C++ headers, so cin is a no-no, sorry.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Michael

Hello,

I have remarked a small problem with the code completion plugin.

I have implemented using templates a PriorityQueue which wraps a multimap. The class has been defined inside a namespace.

To test the PriorityQueue, I have created a cpp file, imported the PriorityQueue and played a bit with it. The problem is that the code completion plugin does not seem to work. I know that it does not work with standard C++ headers (thanks to thomas), but with the "non standard" of my PriorityQueue, it should work. Checking a bit, I have remarked that when typing the namespace (where the PriorityQueue has been defined) and the scope operator ("::"), then the plugin works and it displays me all the class functions.

Does the plugin have problems managing namespace or do I have missed something?

I use C::B RC 2 (GNU GCC compiler) unter Windows XP SP2.

Thank you very much.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

lenkite

Thanks thomas..I was tearing my head out wondering whether I made some sort of stupid error.
That apart, I really hope we get code-completion with standard headers...could make use of ctags here.

mandrav

Quote from: Michael on December 07, 2005, 07:52:53 PM
Does the plugin have problems managing namespace or do I have missed something?

No, it just doesn't recognize the "using" keyword (yet).
Be patient!
This bug will be fixed soon...

Michael

Quote from: mandrav on December 07, 2005, 08:38:18 PM
No, it just doesn't recognize the "using" keyword (yet).
Ok. Thank you very much for the information.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]