I showed my some code to you(c++), and I have to use my_len
function for length.
How can I do it for my_len(?????)
. What should I write as a function parameter? Should I create Constructor?
Thanks a lot.
Header:
class String
{
public:
..........
.........
int length();
private:
.........
};
My Codes:
int my_len(const char* p) {
int c = 0;
while (*p != '\0')
{
c++;
p++;
}
return c;
}
int String::length()
{
my_len(?????);
}