If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Welcome to Qt Centre.

Qt Centre is a community site devoted to programming in C++ using the Qt framework. Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — register and post your question.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Structs for C++ and Qt

just wondering if there is a set way of doing structs in qt. i have made structs before in the past using C, but im not too sure about using C++ to do it and to make it work with the Qt stuff. any idea's???

Re: Structs for C++ and Qt

ah ok thankyou...whilst im on the subject of storage, would it be easier to have a 2-d array of booleans or an array of linked lists??how would i create a 2-d array of booleans anyway because ive never tried it before - even with C??

Re: Structs for C++ and Qt

Originally Posted by therealjag

ah ok thankyou...whilst im on the subject of storage, would it be easier to have a 2-d array of booleans or an array of linked lists??how would i create a 2-d array of booleans anyway because ive never tried it before - even with C??

It depends. In general there are no such things as 2D arrays. How many bools do you need in each "row"? Maybe you could use bit fields?

in a .cpp file which include the .h as definition.
When i use the struct field members in a .cpp, the compiler rise up some problems, such as "multiple definition" of the _stxy1000 variable.
Do you think i should use extern in the declaration?
Could you please post a c-like code??
Thanks in advance.
Andrea

Last edited by wysota; 6th June 2011 at 12:55.
Reason: changed [qtclass] to [code]