C++ program errors

Hello,

I want to set up my program on linux. I compile it, but when I made it, give the following errors:

index_set.h: In constructor ‘index_set<T, Cmp>::index_set()’:
index_set.h:19: error: there are no arguments to ‘begin’ that depend on a template parameter, so a declaration of ‘begin’ must be available
index_set.h:19: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
index_set.h: In member function ‘void index_set<T, Cmp>::clear()’:
index_set.h:21: error: there are no arguments to ‘begin’ that depend on a template parameter, so a declaration of ‘begin’ must be available
index_set.h: In member function ‘const T& index_set<T, Cmp>::operator[](int) const’:
index_set.h:27: error: there are no arguments to ‘end’ that depend on a template parameter, so a declaration of ‘end’ must be available
index_set.h:27: error: there are no arguments to ‘begin’ that depend on a template parameter, so a declaration of ‘begin’ must be available
index_set.h: In member function ‘const T* index_set<T, Cmp>::operator()(int) const’:
index_set.h:35: error: there are no arguments to ‘end’ that depend on a template parameter, so a declaration of ‘end’ must be available
index_set.h:35: error: there are no arguments to ‘begin’ that depend on a template parameter, so a declaration of ‘begin’ must be available
index_set.h: In member function ‘void index_set<T, Cmp>::remove(int)’:
index_set.h:42: error: there are no arguments to ‘end’ that depend on a template parameter, so a declaration of ‘end’ must be available
index_set.h: In member function ‘void index_set<T, Cmp>::sort()’:
index_set.h:49: error: there are no arguments to ‘begin’ that depend on a template parameter, so a declaration of ‘begin’ must be available
index_set.h:49: error: there are no arguments to ‘end’ that depend on a template parameter, so a declaration of ‘end’ must be available
index_set.h: In member function ‘int index_set<T, Cmp>::position(const typename index_set<T, Cmp>::iterator&) const’:
index_set.h:55: error: there are no arguments to ‘begin’ that depend on a template parameter, so a declaration of ‘begin’ must be available
make[1]: *** [TOpt.o] Error 1

Please help me... Many thanks.
You'd need to post your code to get help on this.
Hi Kultrva,

I use versiyon of g++-3.4, gcc-3.4, cpp-3.4, libg2c0-3.4.

A part of make:

g++ -o TOpt.o -c -g -pg -D_DEBUG_ -pthread -m32
-I/home/sule/root/include -I/usr/include/mysql/ -I. TOpt.cc
In file included from TBLWc1TrackContainer.h:17,
from TBLTrack.h:8,
from TBLUtil.h:16,
from TBLWc1SegmentContainer.h:16,
from TBLLinear.h:7,
from TOpt.cc:23:
index_set.h: In constructor 'index_set<T, Cmp>::index_set()':
index_set.h:19: error: there are no arguments to 'begin' that depend
on a template parameter, so a declaration of 'begin' must be available
index_set.h:19: error: (if you use '-fpermissive', G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
index_set.h: In member function 'void index_set<T, Cmp>::clear()':
index_set.h:21: error: there are no arguments to 'begin' that depend
on a template parameter, so a declaration of 'begin' must be available
index_set.h: In member function 'const T& index_set<T,
Cmp>::operator[](int) const':
index_set.h:26: error: there are no arguments to 'size' that depend on
a template parameter, so a declaration of 'size' must be available
index_set.h:27: error: there are no arguments to 'end' that depend on
a template parameter, so a declaration of 'end' must be available
index_set.h:27: error: there are no arguments to 'begin' that depend
on a template parameter, so a declaration of 'begin' must be available
index_set.h: In member function 'const T* index_set<T,
Cmp>::operator()(int) const':
index_set.h:34: error: there are no arguments to 'size' that depend on
a template parameter, so a declaration of 'size' must be available
index_set.h:35: error: there are no arguments to 'end' that depend on
a template parameter, so a declaration of 'end' must be available
index_set.h:35: error: there are no arguments to 'begin' that depend
on a template parameter, so a declaration of 'begin' must be available
index_set.h: In member function 'void index_set<T, Cmp>::remove(int)':
index_set.h:42: error: there are no arguments to 'end' that depend on
a template parameter, so a declaration of 'end' must be available
index_set.h: In member function 'void index_set<T, Cmp>::sort()':
index_set.h:49: error: there are no arguments to 'begin' that depend
on a template parameter, so a declaration of 'begin' must be available
index_set.h:49: error: there are no arguments to 'end' that depend on
a template parameter, so a declaration of 'end' must be available
index_set.h: In member function 'int index_set<T, Cmp>::position(const
typename index_set<T, Cmp>::iterator&) const':
index_set.h:55: error: there are no arguments to 'begin' that depend
on a template parameter, so a declaration of 'begin' must be available
index_set.h: In member function 'int index_set<T, Cmp>::Size() const':
index_set.h:59: error: there are no arguments to 'size' that depend on
a template parameter, so a declaration of 'size' must be available
make[1]: *** [TOpt.o] Error 1
make[1]: Leaving directory `/home/sule/blast/BlastLib2'
make: *** [all] Error 2
Topic archived. No new replies allowed.