I am a litttle bit unclear about what you're wanting to do. But if you want to insert a string, etc into your class then it's this kind of thing.
Depending on what your class does with the inserted data, you might be able to use a templated function. Otherwise you'll need to overload operator<< for each type separately.
I guess I wanted to do something in the wrong way. The class is supposed to accept data (string, int...) and count the number of chars that pass thru it, meaning every char and every digit as part of an int, float, and the decimal dot. What I was thinking was to overload the << only once, so that whatever it accepts, it prints out and adds the number of chars, and in the end it prints the total number of chars. It seems that I have to overload the << for each var type.
Now, that brings me to a new problem - I need to cascade call the operator. So:
so<< "what ?" << 12 << 12.5;
In this example I have 3 << operators, each overloaded differently. Will I be able to cascade them?
EDIT:
I see you edited so, I used this example, and i did
so << "what" << 123;
and it works, thanks a lot!