[webkit-help] Assigning String::utf8().data to another pointer

fun runner funrunner0 at gmail.com
Sat Nov 20 05:18:57 PST 2010

Am new to c++ and webkit. was wondering why utf8().data() can't be assigned
to another pointer?

    String trial("trial");
    single = trial.utf8().data();
    std:: cout << "trial is " << trial.utf8().data() << std::endl;
    std:: cout << "single is " << single << std::endl;

The second print is printing junk.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20101120/34ebd046/attachment.html>

More information about the webkit-help mailing list