Will the following code correctly zero-initialize the memory returned from malloc?
malloc
#include <cstdlib>#include <new>int main(){ char* p = new (std::malloc(10)) char[10]{};}
Aucun commentaire:
Enregistrer un commentaire