K
kvnsmnsn
I've been asked to overload the insertion operator. What exactly is
the insertion operator in C++, and how would one overload it? I think
that in C I could overload the "+" operator like so:
double operator+ ( char* left
, char* right)
{
// some code here
}
Could I do that in C++ too? Or is there a different way to do it?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
the insertion operator in C++, and how would one overload it? I think
that in C I could overload the "+" operator like so:
double operator+ ( char* left
, char* right)
{
// some code here
}
Could I do that in C++ too? Or is there a different way to do it?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_