Bingo! I had added 'using namespace std' since my post, but I didn't realize that the functions needed to be out of the class. Works like a charm now, thanks :)
Type: Posts; User: Artemis0583
Bingo! I had added 'using namespace std' since my post, but I didn't realize that the functions needed to be out of the class. Works like a charm now, thanks :)
It seems that you are confusing the class and the class instance. You were (originally) trying to initialize the variable as
int student[STUDENT_LIMIT];
That line would create an integer array...
Nevermind, realized I was missing several ';' at the end of my functions. I've fixed that and am left with:
#include <iostream>
template <typename T>
class Primitive
{
public:
...
So what you're saying is remove the friend qualifier?
I have a public getData() method and will make a public setData() method, although I was waiting until I had the output operator working.
I...
Having some trouble understanding how to overload operators (specifically << and >> ) for
a templated class.
Here's what I have in Attribute.h:
#include <iostream>
template <typename T>...