CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008
    Posts
    32

    Accessing vectors

    Given something like

    std::vector<object*> objectarray;

    where object is a type of class with int valuea


    how would you access the valuea from the object pointed to by the third pointer in objectarray?

    Would you pass objectarray like this?

    func(objectarray);

    just like any other vector?

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Accessing vectors

    *objectarray[2]

    Unles I'm misunderstanding your question

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured