Hello again.
Once again another problem...
Well i made a very good string class, only problem is, i don't know how to use an operator= for assignment.
I have operator='s programed in but i don't know how to make it an assignment operator.
for instance:
String str1 = "Hello"; // what i want it to do
String str2("Hello"); // what it does now...
how would i put that in code? would i make the constructor:
String operator=?
if i try to do it now with the = operator, it says no matching function.
instead i have to do this:
String str;
str = "Hello";
and one more question...
i want to add operator+(...) but, im not sure how to assign it, i know i need to make it a return value of String, or char*. But how do i do it? do i have to do:
String operator+(String,char*);
String operator+(String,int);
// ect..
String operator+(char*,char*);
String operator+(char*,int);
// ect...
or is there a shorter way like a "..." operator
Thanks in advance. :)