[
Originally Posted by
manav
I understand the '+', but what is '-' for?
Iterators.
Iter1 + Iter2
OR
Iter1 - Iter2
I really need to implement a range iterator here or some such. A lot of thinking left there.
Originally Posted by
manav
Would you enable this in your string class?
Code:
CStringEx str;
int age = 23;
float cm = 167.1f;
str << "She is " << age << " years old, " << cm << " centimeter high!" << endl;
No, but this would work:
Code:
CStringEx str;
int age = 23;
float cm = 167.1f;
str = "She is "+ age + " years old, " + cm + " centimeter high!";
cout << str << endl;
Or rather, float and doubles don't work. At least not yet, but maybe in the future. But integers works.