Can't convert Long to String



  • 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));



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

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

    -Niklas



  • 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



  • 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.


Log in to reply