what does explicit do c++ code example
Example 1: explicit in c++ meaning
class String {
public:
explicit String (int n); //allocate n bytes
String(const char *p); // initialize sobject with string p
};
Example 2: explicit in c++ meaning
class String {
public:
String(int n); // allocate n bytes to the String object
String(const char *p); // initializes object with char *p
};