I assume the struct definition is part of some third party functionality/library, where the third party may well be someone inside your own company.
If the implementors chose to not make stData
a pointer, then there are reasons. They will have an idea about how to express "stData
is empty", if it is even allowed to be empty. You should definitely try to look up those semantics in the documentation or talk to them. Don't try to add your own semantics to a structure that has a specific purpose and semantics.
So if there is a predefined way to express that part of the struct is empty, use that way. If it may not be empty for the uses it is intended for, then don't try to make it empty. In a nutshell, don't use a class/struct in a way it is not meant to be used. Instead, if you find yourself in a situation where you only have part of the data that is needed for the 'MyData' to make sense, then write your own 'MyPartialData' struct to deal with that situation and translate it to a 'MyData' once you have everything needed and are ready to interact with the third party API.