rendered paste bodyG:\rSDKremote\trunk\rSDK_prealpha\Extensions\Template\Properties.h(6) : error C2143: syntax error : missing ';' before '.'
G:\rSDKremote\trunk\rSDK_prealpha\Extensions\Template\Properties.h(6) : error C2501: 'General_tab' : missing storage-class or type specifiers
G:\rSDKremote\trunk\rSDK_prealpha\Extensions\Template\Properties.h(6) : error C2371: 'General_tab' : redefinition; different basic types
G:\rSDKremote\trunk\rSDK_prealpha\Extensions\Template\Properties.h(5) : see declaration of 'General_tab'
G:\rSDKremote\trunk\rSDK_prealpha\Extensions\Template\Properties.h(6) : error C2143: syntax error : missing ';' before '.'
Properties.h
//
// Properties:
//
properties General_tab;
General_tab.StaticString(1,"Hello world","test");
rTemplate.... the class:
template <class type> _inline void resize(type& array, size_t size) { array=*(type *)realloc(array,sizeof(type)*size); }
class properties{
private:
PropData * props;
int propcount;
public:
//Constructor
properties(){
propcount=0;
props=0;
}
//Add prop to array
void addProp(int ID,UINT_PTR sName, UINT_PTR sInfo,UINT_PTR lType,DWORD dwOptions,LPARAM lCreateParam){
PropData toAddProp={ID,sName,sInfo,lType,dwOptions,lCreateParam};
++propcount;
resize(props,propcount);
props[propcount-1]=toAddProp;
}
//Get props
_inline PropData * getProps(){
return props;
}
//Predefined props:
_inline void StaticString(int ID,const char sName,const char sInfo) {
addProp(ID,(int)sName,(int)sInfo,PROPTYPE_STATIC,PROPOPT_NIL,(LPARAM)NULL);
}
};
And edittime.cpp includes properties.h