template <class Type, int SetSize> set_type<Type,SetSize> set_type<Type, SetSize>::operator- (const set_type<Type, SetSize>& set2) const
{
if(set2.is_empty()) // if the second set is empty, the result is the first
{

cout << "Enter the letter reference to check the status of an element in Set One: ";
cin.get(ele); // get one char from input stream
cin.ignore(); // ignore the rest of the stream
fout << ele;
if (set_one.is_element(ele)) fout << " is an element of ";
else fout << " is not an element of ";
set_one.print_set(fout);
fout << endl;

The errors that I keep getting are linking errors which are usually when an interface doesn't match up to an implementation, however I can't seem to find anything wrong with it unless I'm just not using it correctly. If anyone has some advice please feel free to share, I've given alot of points on this one due to I've spent hours looking at the same thing, Good Luck!!

It should be difficult to allow the separation of declaration and implementation of templates to different files: When the templated gets instantiated the types are specified and actual code is generated. But the implementation of the template can't be compiled nor linked since the types are missing. And C++ should do type checking. So for separating it to two files you need to include both to the file using it and the implementation file should not get compiled, otherwise you get linking errors. That way to allow normal handling of endings the implementation has to be in a .h(pp) file as well and a separation of two headers doesn't really make sense.

0

Featured Post

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into.
One of these problems is selecting and deleti…

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…