Liste des Groupes | Revenir à cl c |
On 11/07/2024 16:58, David Brown wrote:Well, yes, I /did/ say that.On 11/07/2024 13:22, bart wrote:If the original array has type T[N], then the T is passed, but the N is lost. The [] is also lost:; it turns into *. But in C, that doesn't matter too much; it can still index that object!>Not it isn't. The fact that I can do this:(Here I'm talking about info attached to the parameter name; the type itself may still have that N. Have I mentioned that C is mess?)>
You've mentioned very clearly that your understanding of C is a mess. C itself is quite simple here,
void F(vector a) {} // typedef byte vector[100];
and get the type of 'a' as 'byte*', sizeof(a) as 8, sizeof(*a) as 1, but sizeof(vector) as 100, suggests all sorts of shenanigans.
and the rules are not hard to understand.Ha ha ha! Of course you would say that.
Les messages affichés proviennent d'usenet.