Im quite noob in c++ so i ask you to explain it the in the simplest way you can, please! I know that to say:
int * p = new (x) int;
is like to say:
operator new (sizeof(int), x);
But why?? Can someone do me some simple exaple and explain it? And if i'm wrong, could you try to correct me, and explain it? I come from C# language so for me if a little bit disorienting to see this new syntax. I have like the feeling that there is much more to understand about the way this new is used in c++. I'm i wrong? Thanks a lot!
Update:
"I just found this useful videos" where is explained very well some content related to this topic. If someone need it just enjoy:
in this video this guy explain very well tyhe basics of new in c++:
https://www.youtube.com/watch?v=NUZdUSqsCs4
Here an interesting video about operator overloading in c++:
https://www.youtube.com/watch?v=mS9755gF66w&t=683s
And here the most important one where this guy explain very well something called "placement new" In C++:
https://www.youtube.com/watch?v=2bsGFQgBMXs
All these 3 videos togheter gave me a lot more awareness about the topic!