Discussion:
[Openexr-user] typdef in g++
Dharmendra Bhojwani
2006-10-10 12:50:32 UTC
Permalink
Hi everyone

I have some declaration in public: section of one class like this...

----------------------------------
file "a.h"
----------------------------------

template<class T> class example
{
public:
typedef std::vector <T*> TMem;
typedef typename TMem::iterator TMemIter;
typedef typename TMem::const_iterator TMemConIter;
typedef typename TMem::size_type TMemSize;
};


-------------------------------------------------
file "b.h"
---------------------------------------------------

#include "a.h"
.............
..............
func()
{
for (TMemConIter iterMemb = iMem.begin (); iterMemb != iMem.end (); iterMemb++)

}
........
........
..........
i compile this with g++ compiler and gets error

`TMemConIter' undeclared (first use this function)"

Can anybody help please ?

Thanks


---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
Loading...