I saw the most incredible claim, "C/C++ has no native support for such a structure [strings]. It's only in the STL.".
Err, yea, it's hard to do C++ nowadays without the STL.
You might think this code won't work:
std::string arg("Hi me");
if( "Hi me" == arg ) { printf("Yup"); }
But it resolves to
operator==(const char*, std::string &);
Of course it leads to the horror I have to deal with:
Ret myFun(const char *charp)
{
FX::FXString foxStr(charp);
randomFoxFun(&foxStr);
std::string stlStr(foxStr.text());
randomStlFun(&stlStr);
// convert STL string to Fox String
// convert STL string to char*
}
No comments:
Post a Comment