Vector array hint "vector subscript out of range" is a headache for the vs2010 under the Windows platform

Source: Internet
Author: User
for the following part of the code, the VS2010 Windows platform prompts the array to cross (compile through, execute EXE prompts) but the codeblock is normal under deep Linux.
        The first form of
   /*vector <OutLineHand>  outline (filtercontours.size () +1);
    For (size_t  i = 0; i < filtercontours.size (); i + +)
    {
        outlinehand (filtercontours[i],nframe);
        Outline[i] = Outlinehand (filtercontours[i],nframe);
    } *
       //second form of
    Vector <OutLineHand>  outline;
    for (int i = 0; i < (int) filtercontours.size (); i + +)
    {
        outline.push_back (Outlinehand (filtercontours[i), Nframe));

    }

... 1.OutLineHand is a custom encapsulated contour class that contains data members and member functions. 2.filterContours is the vector< vector > type, image processing contour (a set of points). 3.OutLineHand is a custom encapsulated contour class constructor that I breakpoint debug execution to

    Outline[i] = Outlinehand (filtercontours[i],nframe); This tip crosses the line.

Anyone who encounters such a problem, please advise. Thank you.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.