I am getting the following error msg:
This is the code that relates to it :
Type mismatch in redeclaration of 'operator <<(ostream &,const String &)'
//this is in the struct
friend ostream& operator <<( ostream& out, const String& wrd);
//this is the fnct
ostream& operator <<( ostream& out, const String& wrd)
out << wrd.str;
Ok, yes I edited my entire message, that's because I'm a moron. The reason your getting the message is because ( at least it seems) that you are passing either a struct or class as a argument yet you overloaded the operator telling it you are passing a String reference. Here is the solution:
just replace class with whatever name you gave your class or struct.
friend ostream& operator<<(ostream&, class& );