I am stuck in printf problem. I would appreciate it if I could get help here: In the code below, I see that the font family moves correctly in the first printf (), but if I set it to a variable, I get only an empty string. How can I put it in a variable and have the correct values? I just don't want to type 'font.family (). Family (). String (). Utf8 (). Data () 'everywhere?
I did this using the same method:
void myMethod() { const char* fontFamily = font.family().family().string().utf8().data();
And the signature 'data ()' is
class CString { public: CString() { } CString(const char*); CString(const char*, unsigned length); CString(CStringBuffer* buffer) : m_buffer(buffer) { } static CString newUninitialized(size_t length, char*& characterBuffer); const char* data() const;
Utf8 () signature is
class String { CString utf8() const; }
Thanks.
c ++ printf
michael
source share