This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have code: #include <vector.h> using namespace std; class Test{ string Name; }; int main(int argc, char**argv) { vector<Test*> myVector; vector<Test*>::iterator myIt; // //insert in vector objects // // get access to vector elements myIt = myVector.begin(); (*myIt)-> // <- here I call CodeComplete and I see only "No suggestions" but I expected to see "Name" return 0; }
of course should be: class Test{ public: string Name; };
Even if I place "public:" keyword in class definition, I can't see members of class.
Unfortunately method refactoring breaks code if iterators are used. First sample: - Create Quote project - Rename 'GetName' method in customer.h file (Refactor->Rename menu item) - Build project ==> build fails Other sample: - Add such code into project: ----------------------------------------------- #include <vector.h> #include <iostream> using namespace std; class Test{ private: string Name; public: Test(string str): Name(str) {} string getName() {return Name;} }; int main(int argc, char**argv) { Test* t = new Test("test"); vector<Test*> myVector; myVector.push_back(t); vector<Test*>::iterator myIt; myIt = myVector.begin(); cout << ((*myIt)->getName()) << endl; return 0; } ----------------------------------------------- - Rename 'getName' method in 'string getName() {return Name;}' line (Refactor->Rename menu item) - Build project ==> build fails
*** This issue has been marked as a duplicate of 136146 ***