They mean the same thing. This method of programming has crept in because of recursive data structures. If it is not recursive, you can just use
typedef struct
{
...
} GRBModel;
The problem comes when it is recursive: how do you use something before it is defined since it cannot be forward declared? You will get a compilation error if you have something like
Since it is not consistent: some have names and some don't have names, some developers have decided that everything should have names regardless of whether they are of any use.
The other thing you can do with typedef is multiple definitions.
Sorry, I went off on a tangent. The original question, what does struct _GRBModel mean - it is the structure which should have been declared previously.
I wouldn't say you went off on a tangent. Your post was quite informative. I have been programming with C for a good 20 years, professionally for 15 and learned something new.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.