I'm confused with the way to initial the pointer. Here is my code:
int *p;
int a = 5;
new(p) int(a);
If it's the operator new function, how does the int(a) mean?Why can the statement achieve the initialization of the pointer?
I'm confused with the way to initial the pointer. Here is my code:
int *p;
int a = 5;
new(p) int(a);
If it's the operator new function, how does the int(a) mean?Why can the statement achieve the initialization of the pointer?