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:
Cinema 4D Version: 11
Language(s) : C++ ;
Can anyone of you try to execute this two lines on Xcode?
> \> GeDynamicArray<String>z; \> z.ReScope(4); \>
\> 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.
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); \> \> z.ReScope(4); \>
\> GeDynamicArray<String\*>z; \> \> String \*str = NULL; \> str = gNew String("hallo"); \> \> z.Push(str); \> \> GePrint(\*z); \> \> z.ReScope(4); \>
On 03/11/2008 at 06:13, xxxxxxxx wrote:
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.