Hi,
Im not sure if this is possible.
I want clients of this class to use AddField - so the class will store field information internally.
Then, after the data has been stored in memory, i want the client to call GetData :-
class cDataSet {
public:
cDataSet() {};
~cDataSet() {};
template<class T> void AddField(string Name, T Type) {};
template<class T> T GetValue() {} ;
};
However im having problems compiling (vc6,win2k)
// in main() ..
cDataSet cDS;
int i;
i = cDS.GetValue<int> (); // type 'int' unexpected.
Any ideas ?
Thanks in advance,
Rich.
"Programmers are tools for converting caffeine into code - BSRF"
Im not sure if this is possible.
I want clients of this class to use AddField - so the class will store field information internally.
Then, after the data has been stored in memory, i want the client to call GetData :-
class cDataSet {
public:
cDataSet() {};
~cDataSet() {};
template<class T> void AddField(string Name, T Type) {};
template<class T> T GetValue() {} ;
};
However im having problems compiling (vc6,win2k)
// in main() ..
cDataSet cDS;
int i;
i = cDS.GetValue<int> (); // type 'int' unexpected.
Any ideas ?
Thanks in advance,
Rich.
"Programmers are tools for converting caffeine into code - BSRF"