Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    BaseArray::Insert( position, value ) documentation

    Cinema 4D SDK
    r19 r20 c++ sdk
    3
    3
    716
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C4DSC
      C4DS
      last edited by C4DS

      As a result of a recently reported issue with the R19 documentation (missing code snippets), I was comparing the documentation of R20 with R19 as I thought having noticed a bug in R19 SDK sample.
      Seems the R20 SDK sample still has. As such, I was wondering if I was incorrectly interpreting the documentation?

      	// Insert an element at index 5.
      	array.Insert(value, 5) iferr_return;
      

      According to the documentation the above code from arraytutorial.cpp would insert "5" at position "value", right? Instead of the comment referring to "value" being inserted at position 5.
      So, which is correct, the sample or the documentation?

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by

        Yes, that is wrong. Index is first.

        1 Reply Last reply Reply Quote 0
        • S
          s_bach
          last edited by

          Hello,

          Indeed this example is wrong. We will fix that as soon as possible. Thanks for noticing us.

          best wishes,
          Sebastian

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          1 Reply Last reply Reply Quote 1
          • First post
            Last post