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

Problems with CScope and vectors

(1/1)

Geowil:
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;
};

--- End code ---


--- 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;
    }
}

--- End code ---

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?

danselmi:
As yu can see on the CScope page: http://cscope.sourceforge.net/
"The fuzzy parser supports C, ..."

Geowil:

--- Quote from: danselmi on April 11, 2014, 10:32:35 am ---As yu can see on the CScope page: http://cscope.sourceforge.net/
"The fuzzy parser supports C, ..."

--- End quote ---

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?

Navigation

[0] Message Index

Go to full version