Lets assume we've got a DLL and there should be an array stored globally in it that's going to be exported, the thing is we want to initialize it by reading some content from a file, so personally I find myself no other way than putting it in a struct to be able to initialize using constructor:
struct Construction{
public:
Construction(){
//do the initialization thing and read the needed data from the file
}
SomeType sTArray[100];
};
__declspec(dllexport) Construction obj();
Now where it's going to be used, the programmer can initialize a reference to it and then use the reference like below:
SomeType (&arrayRef)[100]=obj.sTArray;
Now would you think I'm wrong in any context?