Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Geowil on April 11, 2014, 06:34:59 am

Title: Problems with CScope and vectors
Post by: Geowil on April 11, 2014, 06:34:59 am
Does anyone know how to get CScope to correctly deal with vectors?  For example if I have a vector of class objects, CScope cannot dig into that particular class when I am writing a function call through the vector.  An example is in order I think:

Code
class A
{
public:
    A();
    string getText();

    void setText(string s);

private:
    string aText;
};

Code
int main()
{
    vector<A> aObjects;

    for (int i = 0; i < 10; i++)
    {
        aObjects.push_back(A());

        //code to add random text to the object just created
    }

    for (int i = 1; i <= aObjects.size(); i++)
    {
        cout << "Object " << i << " contains the text " << aObjects.at(i-1).getText() << endl;
    }
}

In the example above, after I type the . operator after the at(i-1) no list of functions present in A shows up.  This also happens with structs and with nested vectors.  Is this a known bug or maybe caused by some artifact of how I have my CB (version 13.12) installed?
Title: Re: Problems with CScope and vectors
Post by: danselmi on April 11, 2014, 10:32:35 am
As yu can see on the CScope page: http://cscope.sourceforge.net/ (http://cscope.sourceforge.net/)
"The fuzzy parser supports C, ..."
Title: Re: Problems with CScope and vectors
Post by: Geowil on April 11, 2014, 09:57:55 pm
As yu can see on the CScope page: http://cscope.sourceforge.net/ (http://cscope.sourceforge.net/)
"The fuzzy parser supports C, ..."

So, CScope cannot do its thing on some of the more C#/C++-like stuff?  Well that sucks.  Are there any plugins similar to CScope but that have full C++/C# support?