Where did you put the implementation? You will have problems if they are in a separate cpp. Either put it in the h file or put it in an "inl" file and #include the inl file at the bottom of the header right before #endif

"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

inl stands for inline. Basically the same as putting all the code in the h but just doesn't clutter things as much. I don't know any compilers that support the 'export' keyword at present. That would be the only other way to do it I believe.

"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

Your solution works but I've found another problem. When I try call the overloaded stream insertion operator with an array object I get an unresolved error. Also some of the errors from g++ suggests that the overloaded operators are not template functions. Could this be the problem?

Is the insertion operator implementation in your header? I don't really see any problems with it how it is. In fact, I opened up VC6 and threw all your code in a project and it compiled and ran fine. My main looked like this:

"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers