GeDynamicArray String?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/11/2008 at 10:03, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:      
    Language(s) :     C++  ;

    ---------
    Hi!

    Can anyone of you try to execute this two lines on Xcode?

    #include "ge_dynamicarray.h"

    > \> GeDynamicArray<String>z; \> z.ReScope(4); \>

    I get this message on compiling:

    ../../resource/_api/ge_dynamicarray.h:480: error: no matching function for call to 'String::operator new(long unsigned int, String*&)'
    ../../resource/_api/c4d_string.h:46: note: candidates are: static void* String::operator new(size_t, const std::nothrow_t&, int, const CHAR* )

    Does anyone know how I can get this to work? Thanks.

    Bye.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/11/2008 at 05:57, xxxxxxxx wrote:

    I think it may have to do with the variable sized nature of the String class. Maybe it would be better to store pointers to the strings in the array? Something like this:

    > \> GeDynamicArray<String\*>z; \> \> String \*str = NULL; \> str = gNew String("hallo"); \> \> z.Push(str); \> \> GePrint(\*z[0]); \> \> z.ReScope(4); \>

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/11/2008 at 06:13, xxxxxxxx wrote:

    Thanks Matthias,

    i tried GeData which works. I tried out a pointer to String before, but I have to deallocate the object by hand.

    So I think GeData could be much better.

    Bye.


Log in to reply