Home > Back-end >  How in QT classes defined in two with an empty array structure
How in QT classes defined in two with an empty array structure

Time:09-18

As shown in the topic, I want to use free two array in a class structure of what, C99 standard empty array must be the last member of the structure, and this structure is used in class must also, the last member of the class, then the problem: I now have two with an empty array structure, inside the class how to define?

CodePudding user response:

Why the definition of empty, define a 1 byte

CodePudding user response:

reference 1/f, Simple, Soft reply:
why the definition of empty, define a 1 byte

Because of these two structures are variable-length, I want to define this, after the instantiation structure will automatically assign the data space,

CodePudding user response:

Yes, longer generally define a byte, you see, a lot of structure of Windows are defined

CodePudding user response:

reference 3 floor is Simple - Soft reply:
yeah, longer generally define a byte, you see, a lot of structure of Windows are defined

Boon boon, I try the 1 byte

CodePudding user response:

Use a structure pointer it is not sweet
Dynamically allocated memory, destroying the class remember release can




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- a delicate small tail -- -- --
https://bbs.gnsoft.ltd
-------------------------
  • Related