[Qt-interest] QString from char array
Donal
donaloconnor at gmail.com
Wed Jan 21 23:14:48 CET 2009
Yep sorry meant 5 - final index of 4 :)
On Wed, Jan 21, 2009 at 10:13 PM, Scott Aron Bloom <Scott.Bloom at sabgroup.com
> wrote:
> Just a note.. an array size of 5 is necessary not 4…
>
>
>
> *From:* qt-interest-bounces at trolltech.com [mailto:
> qt-interest-bounces at trolltech.com] *On Behalf Of *Donal
> *Sent:* Wednesday, January 21, 2009 2:11 PM
> *To:* qt-interest at trolltech.com
> *Subject:* Re: [Qt-interest] QString from char array
>
>
>
> Well all strings have to be terminated with that so I'm guessing that is
> your problem.
>
> If receiving 4 characters, have array size 4 with array[4] = '\0' and then
> try converting to QString. I'm guessing this is the problem.
>
> On Wed, Jan 21, 2009 at 10:09 PM, RZ <rz at razfazz.at> wrote:
>
>
> > Have you a null terminating character at the end '\0' at the end of the
> > array?
>
> No - should I ?!?!
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090121/6fe2b8d1/attachment.html
More information about the Qt-interest-old
mailing list