News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

How do I auto complet a pointer point to a class?

Started by linc422, August 03, 2009, 04:01:05 PM

Previous topic - Next topic

linc422

This is what I want:
#include <map>
using namespace std;

typedef map<int, string> map_t;

int main()
{
    map_t m;
    m.insert(1, "one");
    map_t::iterator imap;
    imap = m.find(1);
    imap->second  //which can not be auto completed


Anybody has good idea to solve this problem?
thanks!!

oBFusCATed

The parser is not finished, so it cannot parse advanced templates as the ones in the STL.
There is an ongoing effort to improve the Code Completion (CC) in a separate svn branch,
but I don't think that that version is capable of parsing the std::map

There are two solutions:
1. you do checkout the cc_refactoring branch and start improving the parser;
2. wait until, someone does 1;

p.s. I'm not a CB developer, so I may be wrong about the things I say.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

Quote from: oBFusCATed on August 03, 2009, 04:21:14 PM
The parser is not finished, so it cannot parse advanced templates as the ones in the STL.
There is an ongoing effort to improve the Code Completion (CC) in a separate svn branch,
but I don't think that that version is capable of parsing the std::map

There are two solutions:
1. you do checkout the cc_refactoring branch and start improving the parser;
2. wait until, someone does 1;

p.s. I'm not a CB developer, so I may be wrong about the things I say.

As far as I know, at this time ,the parser can't solve the Op's problem. Parsing template is currently badly.

But I'm try to help a lot.

See the articles on:

http://wiki.codeblocks.org/index.php?title=Developer_documentation
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.