S
Sunny
Hi,
I want to create a library out of a C++ sources. The implementation
should be in object files and there will be a header file which the
client will #include. I want to use templates to implement the code.
This is the API in the header file:
void GenericQSort (T A[SIZE], int len);
and clients can call it like :
Mystring A[SIZE];
GenericQSort(A,size);
where Mystring is user defined data type where he should overload <
operator for comparison. If I define a template function for
GenericQSort, any change made to it will require clients to recompile
which I don't want. How should I implement GenericQSort?
Thanks
I want to create a library out of a C++ sources. The implementation
should be in object files and there will be a header file which the
client will #include. I want to use templates to implement the code.
This is the API in the header file:
void GenericQSort (T A[SIZE], int len);
and clients can call it like :
Mystring A[SIZE];
GenericQSort(A,size);
where Mystring is user defined data type where he should overload <
operator for comparison. If I define a template function for
GenericQSort, any change made to it will require clients to recompile
which I don't want. How should I implement GenericQSort?
Thanks