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

    SortedArray() - "Namespace Maxon has no member class "SortedArray"

    Cinema 4D SDK
    3
    4
    971
    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.
    • P
      pim
      last edited by

      I am migration a plugin to R20.
      Now SortedArray() gives me an error "Namespace Maxon has no member class "SortedArray"
      I tried #include <sortedarray.h>, but the file could not be found (even with " instead of <>)

      0_1540980279307_db51c6bc-c600-4ba9-9933-afc17735e0cf-image.png

      struct MySortedIntegerArray : public maxon::SortedArray<MySortedIntegerArray, maxon::BaseArray<Int> >
      {
      	// your sorted array must implement a LessThan() method
      	static inline maxon::Bool LessThan(Int a, Int b)	{ return a < b; }
      };
      
      1 Reply Last reply Reply Quote 0
      • C4DSC
        C4DS
        last edited by

        Had the same issue, you will need to specifically include it. In R19 you could simply include basearray.h, now you need:

        #include "maxon/sortedarray.h"

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

          Hello,

          please use our Q&A system to mark your posts as questions.

          As @C4DS has shown, to include MAXON API header files, please use

          #include "maxon/sortedarray.h"
          

          You find an example in misctest.cpp.

          best wishes,
          Sebastian

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • P
            pim
            last edited by

            @s_bach said in SortedArray() - "Namespace Maxon has no member class "SortedArray":

            #include "maxon/sortedarray.h"

            Great, thanks to the both of you.
            Next time, I will mark it as a question.

            -Pim

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