Skip to content

Why not using new form of C compatibility headers ? #28

@zhanyuzhang

Description

@zhanyuzhang

There are many C compatibility headers in the project , for example:

#include <assert.h> // for assert
#include <stddef.h> // for NULL
#include <stdlib.h> // for malloc,realloc,free
#include <string.h> // for memset,memmov

I'm confused why not using c prefix header, as follows :

#include <cassert> // for assert
#include <cstddef> // for NULL
#include <cstdlib> // for malloc,realloc,free
#include <cstring> // for memset,memmov

I'm a new c++ beginer , and I learn that we should use the second form, beacuse the xx.h is deprecated:

image

referece to: https://en.cppreference.com/w/cpp/header

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions