I'm normally programming in c++, but are using some clibrary functions for my char*. Some of the manpages like for 'getline', says that input should be a malloced array.
Is it ok, to use 'new' instead?
I can see for my small sample that it works, but could this at some point result in some strange undefined behavior?
I know that a 'new' should match a 'delete', and a 'malloc' with a 'free'.
I'm also not using std::string. And this is intentional.
Thanks