![](https://media.infosec.exchange/infosec.exchange/accounts/avatars/109/297/177/758/188/916/original/dbc47ad988a7a476.jpg)
![](https://lemmy.ml/pictrs/image/c0ed0a36-2496-4b4d-ac77-7d2fd7f2b5b7.png)
6·
2 days ago@affiliate Hey, you didn’t even mention that char *args[]
actually means char **args
in a parameter list.
@affiliate Hey, you didn’t even mention that char *args[]
actually means char **args
in a parameter list.
@stebo02 @Bogus5553 Neither of them require a return value, but void main
isn’t legal C++.
Strictly speaking, it should be
Unsafe block syntax in C++
{ ...}
@racketlauncher831 As far as the C compiler is concerned, there is literally no difference between those two notations. If you declare a function parameter as an array (of T), the C compiler automatically strips the size information (if any) and changes the type to pointer (to T).
(And if we’re talking humans, then
char *args[]
does not mean “follow this address to find a list of characters” because that’s the syntax for “array of pointers”, not “pointer to array”.)