Hi, I'm re-writting my matrix class to practice my programming and the
computer doesn't let me compile the next code: ( this example come
from the constructor of the class)
//the matrix is made of vectors of vectors
template< typename T >
matrix< T >::matrix( unsigned rows, unsigned columns )
{
vector< vector< T ::iterator p;
....
}
if I change "vector< vector< T ::iterator p" to "vector< vector<
int ::iterator p"
then it compiles but it makes the use of templates useless because it
only works now for
matrix < int (obvious)
the error that i get in the latest g++ is:
error: dependent-name 'std::vector<std::vector<T,
std::allocator<_CharT >,std::allocator<std::vector<T,
std::allocator<_CharT ::iterator' is parsed as a non-type, but
instantiation yields a type.
Can someone explain me whats happening here and how to fix it.
thanks