I can not see what is causing this error....
iterator has been defined properly, but the error seems to point to the interator type.
Errors I get with g++ svector.c++ -o svector 2> ./err_txt
gcc version 4.3.2
svector.c++:38: error: expected constructor, destructor, or type conversion before ‘SVector’
svector.c++:53: error: expected constructor, destructor, or type conversion before ‘SVector’...
User Profile
Collapse
-
prw8864 started a topic What is causing this error: expected constructor, destructor, or type conversiin CWhat is causing this error: expected constructor, destructor, or type conversi
-
typename & inheritance errors also typename & iterator definition errors
In the following code I am trying to create a new templete class (SVector) that is a linked list with the added functionality of an insert method that automatically places items in sorted order.
I am having 2 problems 1) in the statement "class SVector:public list<T>" T is not recognized as per the messages:
svector.c++:21: error: expected template-name before ‘<’ token
svector.c++:21: error: expected...
No activity results to display
Show More