Skip to content

P.8 - make the example function's parameters const #2307

@raybellis

Description

@raybellis

P.8 has two uses of:

void f(char* name) {
    ...
}

Per Con.3 shouldn't name be declared const char * ?

EDIT: Noting also that Con.1 recommends not making function parameters const but this is later contradicted by Con.3 for pointer parameters, and is also touched on in Con.2. Perhaps Con.1 should be updated to make this guidance specific to POD values?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions