Timeline for Compatible types for the main function
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 10 at 21:52 | comment | added | gulpr | @Artyer no it is an example of not understanding what const is, and how to use it | |
May 10 at 18:30 | comment | added | Artyer |
"shall be modifiable by the program": int main(int, const char** argv) { ((char*) argv[0])[0] = 'b'; } : it's still modifiable. I still think it's one of the implementation-defined prototypes, because const char** is not "equivalent" to char*[] like char** is.
|
|
May 9 at 8:42 | comment | added | gulpr | @BoP - indeed, but the intention of the Standard is to have them modifiable. So the programmer shall not change it. (IMO) | |
May 9 at 8:39 | comment | added | BoP |
Even if the program is allowed to modify the parameters, it is not required to do that. Making them const signals an intention.
|
|
S May 9 at 7:43 | history | answered | gulpr | CC BY-SA 4.0 | |
S May 9 at 7:43 | history | made wiki | Post Made Community Wiki by gulpr |