Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Can't convert Long to String

    SDK Help
    0
    4
    326
    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.
    • H
      Helper
      last edited by

      On 07/06/2014 at 08:23, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   14 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Why is it that Xcode keeps telling me that:

      No member named 'IntToString' in 'String'

      in this line:

      GePrint("RGB Loaded:"+String::IntToString(count));

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 07/06/2014 at 08:40, xxxxxxxx wrote:

        'cause you're using R14. Use LongToString() (global function)

        -Niklas

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 08/06/2014 at 05:28, xxxxxxxx wrote:

          Howdy,

          Originally posted by xxxxxxxx

          Why is it that Xcode keeps telling me that:

          No member named 'IntToString' in 'String' 
          in this line: 
          GePrint("RGB Loaded:"+String::IntToString(count));

          This would be an example where the compiler directives I mentioned in the other thread would come in handy to create wrapper functions:

          String MyLongToString(LONG l)
          {
          #if API_VERSION < 15000
              return LongToString(l);
          #else
              return String::IntToString(l);
          #endif
          }
          

          Then you'd simply call:

          GePrint("RGB Loaded:"+MyLongToString(count))
          

          ...and compile for all versions.

          Adios,
          Cactus Dan

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 08/06/2014 at 06:02, xxxxxxxx wrote:

            Yes, you are absolutely right, Dan 🙂
            I still have to start creating all those utility wrappers.

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