5 ms·
C is not a general purpose language, it was always intended to be used by people who want performance and control. If you want to pass a potentially large array
by hahamaster 3y ago
C is not a general purpose language, it was always intended to be used by people who want performance and control. If you want to pass a potentially large array by value to a C function, it's likely that you're using the wrong language.
- teaearlgraycold 3y agoWhat's large got to do with it? You can have a buffer overflow on a small array.
- noobermin 3y agoThat isn't what's proposed here, it's just passing the size with the pointer as one discrete type.
- hahamaster 3y agoYou're right, I was subconsciously replying to other comments about evils of passing parameters by reference.