Your testing is far from complete.
I just made a quick program to help someone that worked.
If you want to explore the matter further, you are more than welcome to.
When they find this thread, without a word of caution, they will believe that malloc can always be used in place of new.
Q: How do I dynamically allocate memory?A: Don't