如何在 OpenCASCADE 中迭代 NCollection_List<T>
NCollection_List<T> 支持使用 C++11 foreach 循环(也称为基于范围的 for 循环)迭代:
iterate_ncollection_list.cpp
NCollection_List<T> myList = /* ... */;
// 迭代 myList
for(const T& value : myList) {
/* ... */
}请记住至少使用 --std=c++11 或等效选项编译,以允许编译器使用基于范围的 for 循环。
Check out similar posts by category:
C/C++, OpenCASCADE
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow