Author Topic: Problems with CScope and vectors  (Read 3897 times)

Offline Geowil

  • Multiple posting newcomer
  • *
  • Posts: 10
Problems with CScope and vectors
« 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?
« Last Edit: April 11, 2014, 06:39:48 am by Geowil »

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: Problems with CScope and vectors
« Reply #1 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, ..."

Offline Geowil

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Problems with CScope and vectors
« Reply #2 on: April 11, 2014, 09:57:55 pm »
As yu can see on the CScope page: 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?