1
Once in some post here on sopt I saw that create new types in C++ with typedef
should be a practice to be abandoned as this is a C practice, and in C++ the correct one would be to use using nomedotipo = tipo;
, then using this new way I could see that the visual studio despite creating a new type, it also created another called unnamed structure:
I don’t understand what you want to know and what this screen has to do with the question. Part of the problem may be because it confuses the functions of things, see https://answall.com/q/101691/101 Or it may just be that the question is incomplete and not saying what is important to understand the doubt.
– Maniero
@Maniero I wondered if creating new types with using is correct or is just a "gambiarra", what made me ask the question was that vstudio have indicated that the new type is also an unnamed structure, as if it were a problem as shown in the image
– Samuel Ives
If you read here someone saying it is correct, why are you suspicious? Was the answer negative? Is there anything more than just wanting confirmation that that is true? Where is this that you are saying indicated? Usually the
using
not to use so, must have a reason, I said normally, this seems a case to only declare thestruct
normally, withoutusing
and withouttypedef
.– Maniero