error C2512: 'Goal<T>' : no appropriate default constructor available
1> with
1> [
1> T=Character
1> ]
1> *\reachtop.h(13) : while compiling class template member function 'ReachTop<T>::ReachTop(T *)'
1> with
1> [
1> T=Character
1> ]
1> *\main.cpp(14) : see reference to class template instantiation 'ReachTop<T>' being compiled
1> with
1> [
1> T=Character
1> ]
instead
December 10th, 2012, 02:29 PM
MrViggy
Re: Linker Error
C2512 Since you've provided a constructor that takes a parameter, you must provide a default constructor as well (a constructor taking no parameters). The compiler will not automatically create one in these cases.
Viggy
December 10th, 2012, 02:36 PM
marsh
Re: Linker Error
I tried providing that already aswell. Same error.
[Edit]
Nevermind i added one to goal aswell and it fixed it. Thank you both.