What does 'data variable' mean in MSVS2010 in this error? I thought I was declaring a symbol that is defined elsewhere in my code.
error C2365: 'g_surf' : redefinition; previous definition was 'data variable'
Obviously this could mean an int or char.
I followed a working example.
I had to include a definition of the class before declaring the symbol.
#include classdef.h
I used the extern keyword to declare an object in stdafx.h.
extern COriginal g_orig;//works
extern CClass g_surf;//how is this declaration resulting in a 'data variable' type?
I instantiate a class in a code file (in global space). This is where the error occurs.
COriginal g_orig(CONST_ARGUMENT);//works
CClass g_surf();//seen as redefinition.
I created a class from two other classes because I need attributes from both.
I can find other redefinition questions that do not offer insight to this one. I haven't found in MSVS2010 or on the web what is meant by 'data variable'.