Victor Bazarov
11/11/2008 4:26:00 PM
(2b|!2b)==? wrote:
> template <typename T1, typename T2>
> struct MyDbInfo
> {
> MyDbInfo():m_pEnv(0), m_tran(0), m_db(0), m_idx(0)
> {}
>
> MyDbInfo(CDbEnv *env, DbTxn* tran, T1* db_ptr, T2
> *idx_ptr):m_pEnv(env), m_tran(tran), m_db(db_ptr), m_idx(idx_ptr)
> {}
>
> ~MyDbInfo()
> {
> delete m_pEnv ;
> delete m_tran ;
> delete m_db ;
> delete m_idx ;
> }
>
> T1 * GetDbHandle() const { return m_db ;}
>
> private:
> CDbEnv* m_pEnv = 0;
> DbTxn* m_tran = 0;
> T1 * m_db = 0;
> T2 * m_idx = 0 ;
> };
>
>
> I get the following errors:
>
> Compiling...
> simple_test.cpp
> c:\test\bdb.h(47) : error C2143: syntax error : missing ')' before '*'
> c:\test\bdb.h(65) : see reference to class template
> instantiation 'MyDbInfo<T1,T2>' being compiled
> [..]
Please next time indicate *which line* in the code you posted is the one
the compiler complains about. Don't post line numbers, just add the
comment to the line (47 in this case) that would say "this is line 47".
Otherwise, how the hell are we supposed to know? And while you're at
it, read the FAQ, especially section 5. I know you probably already
have. So, refresh it then.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask