my question is what steps should i follow in order to declare a function (not the whole class but just a function of the class) as template so that it can process both floats and ints.
Declare the function as template<class T> and implement it substituting template types (int, float) with "T".
Bookmarks