Const (computer programming): Difference between revisions

Content deleted Content added
m strchr problem: wording part 2. Technically, an implementation could look exactly like this.
Line 305:
char*: strchr_m, \
const char*: strchr_c \
)(X,Y)</syntaxhighlight>However, this is not how C23 solves the issue.<ref name="N3020"/>}} since C does not have function overloading, and instead, this is handled by having a single function where the input is constant but the output is writable:
<syntaxhighlight lang=cpp>
char *strchr(char const *s, int c);