Liste des Groupes | Revenir à cl c |
David Brown <david.brown@hesbynett.no> writes:Perhaps it is not the best place - but I learned something new about C++ here, so thank you for that!
[...]In C++, you can't pass arrays as parameters at all - the language#include <cassert>
inherited C's handling of arrays. You can, of course, pass objects of
std::array<> type by value or by reference, just like any other class
types.
typedef int array42[42];
void func(array42& param) {
assert(sizeof param == 42 * sizeof(int));
}
int main() {
array42 arg = { };
func(arg);
}
I suggest that this is not the best place to discuss the nuances of C++.
Les messages affichés proviennent d'usenet.