[Insight-users] error
Martin Urschler
martin at urschler.info
Wed May 18 10:55:08 EDT 2005
You have to use a const variable for the input of a template argument.
A template class is instantiated at compile time, but the value of the
variable that you declare is unknown at compile time, therefore the
compiler cannot resolve your template instantiation.
replace
int size = 4;
with
const int size = 4;
and it will work.
Martin
> Now I want to change 3 with different value by
> repalcing it with a variable such as
> int size = 4;
> typedef itk::Vector< float, size
>
>>MeasurementVectorType;
>
>
> but I always get an error message "error C2973:
> 'Vector' : invalid template argument
> 'NVectorDimension'",
> Could anyone tell me how to define or change the
> MeasurementVectorType with diefferent size.
More information about the Insight-users
mailing list