Yes, I know you can't overload functions like that. That's why I posted. I couldn't make different functions. What if I decided to support six different datatypes? Then the person using my class would have to a) remember which datatype he specified, and b) know the name of the one of those six functions that returns the right type.

Ripper, I'm not sure how to use that as I've never seen it before. Here's a shortened version of my class declaration:
Code:
enum dataType { D_INT, D_CHAR };

class myClass
{
public:
    myClass(dataType);
    ~myClass();

    void                          retVal();

    int                             i_retVal;
    char                          c_retVal;

    std::vector<int>       i_vector;
    std::vector<char>    c_vector;
};