Hi all,
I forgot to add the compiler errors. (Sorry)
Thanks in advance for any help you can offer.
I am writing a template file. I keep getting errors in my constructor that I
dont know how to fix. Here is my snippet:
template <class Type>
LinkedListType<Type>::LinkedListType(): myFirst(0), myCurrent(0),
myPrevious(0), mySize(0)
{
}
Here are the errors that Im getting:
10 C:\Documents and Settings\dge\My
Documents\school\CS2\U2-P1\linkedListType.cpp syntax error before `::' token
10 C:\Documents and Settings\dge\My
Documents\school\CS2\U2-P1\linkedListType.cpp ISO C++ forbids declaration of
`LinkedListType' with no type
C:\Documents and Settings\dge\My
Documents\school\CS2\U2-P1\linkedListType.cpp In function `int
LinkedListType()':
10 C:\Documents and Settings\dge\My
Documents\school\CS2\U2-P1\linkedListType.cpp only constructors take base
initializers
11 C:\Documents and Settings\dge\My
Documents\school\CS2\U2-P1\linkedListType.cpp confused by earlier errors,
bailing out
This is supposed to be the default constructor.
Best regards,
Dane
|