Importing generic linear search and stack written in C++