Home > Back-end >  Related issues about C operator overloading
Related issues about C operator overloading

Time:10-05

Welcome to computer great god to leave a message to help!
//overloaded binary operator
#include
using namespace std;
The class String
{
Public:
String () {p=NULL; }
String STR (char *);
Void the display ();
Private:
Char * p;
};
.
Part of the front is a c + + program, I want to which a great god help solve, the String () {p=NULL; P=NULL}; What do you mean? [/size]

CodePudding user response:

Initialize a pointer, to assign a null values, p

CodePudding user response:

Oh, so why assignment here?
  • Related