am I missing something obvious then? the function GetObj(...) returns "obj"
from the typedef "obj" becomes "struct OBJ"
this is an instance, not a pointer. on an instance you use dot, so VA is correct in leaving the dot alone.
using VS2005 and C++ I have just added the following code to a cpp file:
struct OBJ
{
int x, y;
};
typedef struct OBJ obj;
obj GetObj(const char* control_id) { static obj test; return test; }
static void getCounter()
{
int nValue = GetObj("something").x;
}
this is just your sample code with enough added to use it. this compiles perfectly happily.