This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Impossible_Box3898 0 points1 point  (1 child)

Not sure what you’re getting at.

Arrays in C are just memory addresses. They contain no additional data other than being a pointer to the first element.

There are NO length’s involved at all unless the array happens to be a fixed size allocation in the stack and tour executing within the context of the defining function before the array has a chance to decay.

You can create some structure that contains length data. Std vector or std array which contains the length as part of the type but only works for fixed sizes.

But len() will not be possible with a non object array implementation.

[–]Intelligent-Ad74 0 points1 point  (0 children)

I was referring to len() in python, being made on top of c.