Search:

Type: Posts; User: Artemis0583

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,956

    Bingo! I had added 'using namespace std' since my...

    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 :)
  2. It seems that you are confusing the class and the...

    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...
  3. Replies
    5
    Views
    1,956

    Nevermind, realized I was missing several ';' at...

    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:
    ...
  4. Replies
    5
    Views
    1,956

    So what you're saying is remove the friend...

    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...
  5. Replies
    5
    Views
    1,956

    Overloading templated class operators

    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>...
Results 1 to 5 of 5