THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2007 at 13:20, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.603
Platform: Windows ;
Language(s) : C++ ;
---------
Hi Guys,
I am unable to get the FindFirst member function of the String class to operate correctly. The following code should work, but doesn't:
LONG *charPos = NULL;
String name("Cube Whatever");
if(name.FindFirst(" ", charPos, 0))
{
if(!charPos)
{
GePrint("Exiting");
return TRUE;
}
name[*charPos] = '_';
}
The charPos pointer will ALWAYS return NULL! The really confusing thing is that the console will always print "Exiting" meaning that the FindFirst() is finding the " " in the name string. So the question is: Why is the LONG *Pos parameter not returning a correct pointer? As always any help on this is always much appreciated.
Josh