Delete the deleteelement () in icffloatarraymodel of ICF.

Source: Internet
Author: User

I don't know if ICF is designed too much, or if it is too much of a programming skills.

Ivffloatarraymodel type, when some elements of addelement are deleted.

If you delete it like this

// Deleteint narraysize = 0; m_snapshot_output_matrix_model-> getsize (& narraysize); For (INT I = 0; I <narraysize; I ++) {failed (m_snapshot_output_matrix_model-> deleteelement (I);} m_snapshot_output_matrix_model-> getsize (& narraysize); int test = 0;

In this way, the getsize value is 24, and the size is changed to 12 after the cycle is deleted.

For a long time, if the index is deleted from 0, its index is changed. After 0th objects are deleted, 1st objects are changed to 0. When the index is deleted as 1, 2nd objects are actually deleted.

Therefore, delete it.

// Deleteint narraysize = 0; m_snapshot_output_matrix_model-> getsize (& narraysize); For (INT I = narraysize-1; I> = 0; I --) {failed (m_snapshot_output_matrix_model-> deleteelement (I);} m_snapshot_output_matrix_model-> getsize (& narraysize); int test = 0;

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.