Sorry in advance. I need a pointer class. I'm working on an overload + operator that takes and returns the char in a String at *(s + x) where s is a String and x is an int...so s[x]...
I have it set up as a friend and the following:
......obviously that's wrong but if I put &s.m_buf[x] wouldn't that double reference?? So bottom line is I don't friggin' know what to put there for a return value and Bjarne Stroupstrup needs to write a book idiots like me can read cause I can't understand a thing he says....LOL!!! Any help or better yet a nice little explaination would be cool.Code:char* operator+(const String& s, int x) { return s.m_buf[x]; }