make a pointer to the vector and you can. Your just storing pointers to classb.


Thanks,
Tyler Littlefield
Web: tysdomain.com
email: [email protected]
My programs don't have bugs, they're called randomly added features.

  ----- Original Message ----- 
  From: Vishva 
  To: [email protected] 
  Sent: Tuesday, April 07, 2009 11:43 PM
  Subject: [c-prog] accessing STL vectors


  Dear all, I have a small question

  classA{
  private:
  vector<classB*>items;

  public:
  vector<classB*> returnVectors();
  }

  main(void)
  {
  /* anything else */
  vector<classB*>items2 = returnVectors();
  /* processing items2 */
  }

  Can any change to item2's members change items' members?
  Or is there another way to do it?

  I want to change items values from outside the class.. Please help me..
  -- 
  ●●●●●●●
  විශ්ව
  ●●●●●●●

  [Non-text portions of this message have been removed]



  

[Non-text portions of this message have been removed]

Reply via email to