[Qt-interest] what is wrong with this Complex Data Structure

Andre Somers andre at familiesomers.nl
Tue May 11 10:38:27 CEST 2010


On 11-5-2010 10:29, Andre Somers wrote:
> you could write something like:
>
> //somewhere in a header
> typedef Result QMap<QString, QString>;
> typedef ResultList QList<Result>;
> typedef ResultListMap QMap<QString, ResultList>;
Sorry, those typedefs should be the other way around, of course:

typedef QMap<QString, QString> Result ;
typedef QList<Result> ResultList ;
typedef QMap<QString, ResultList> ResultListMap;

I'm always confused by this inconsistency in C++. For classes, structs 
and unions (and even functions) you first give the name, and then the 
definition, and for typedefs the other way around...

André



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100511/9138ed92/attachment.html 


More information about the Qt-interest-old mailing list