On 17/02/2013 at 03:58, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
---------
Hi Folks,
Could someone please give me a quick C++ lesson in returning another class' function value? I've done copius Google searches but as none are C4D-related in their coding, I'm having a bit of a rough time converting it over.
I've got something like the below (which might not quite be written right, but I'm sure you brainiacs will understand what's going on!) :
class MyClass1
{
public:
String MyString(String temp)
{
temp = String("Print successful!");
return temp;
}
}
class MyClass2
{
MyClass1 MyC1;
public:
virtual Bool MainFunction()
{
String bogus = String("Bogus..");
String Pnt = MyC1.MyString(Bogus);
GePrint(Pnt);
return TRUE;
}
}
But my prints aren't returning anything. I've tried all all sorts of variations of the above (some were compile erronous, other compiled but gave no print result and etc), but none seem to be giving me what I'm after.
Regards,
WP.