On Wednesday 23 June 2010 14:01:42 Ori Lahav wrote:
> Hello QTers,
> I want to use a function that requests float* (array of float) as a
> parameter. The problem is, the data in my program is stored in a linked
> list of float. The only possible solution I could think of is copy the
> whole list to a new array, but it is very expansive (my program uses this
> function a lot).
> Is there any other solution?
The answer to your question was already given (QVector), but I'd like to point
out one discrepancy in your email.
Your subject talks about QList<float>, but the body of your email talks about a
QList is not a linked list -- QLinkedList is a linked list and std::list is a
QList is technically a pointer array, with a special optimisation to store the
type in the pointer value if it fits and is movable.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Qt-interest mailing list