Hi guys!
String in C++ is just an object of class, in C we were using
and all fine with that also over C++ support that.
but what's confusing me, if I'm using string data type as String , in other words using the facility that C++ provide, why while passing string arguments I must write
Code:
Fun(String &argument)
and not just write
Code:
Fun(String argument)
?
I'm really confused about that ! , I'm making an analogy to
String <=> char * , so why I need while calling function by String value to identify the argument of the function that's type String as &argument ?
for example:
Code:
void(std:: const String &argument)
{
cout<<argument;
}