>>迭代器?那应该是STL吧??? class T { … typedef … iterator // iterator type T iterator begin(); // first element of the container iterator end(; // element after last of the container }; Container C … Container::iterator i for( i = C.begin(); i != C.end(); i++) // do something with *i 这样子C#目前是不支持范行,不是没有高手,是你问的过时了 qqchen79(知秋一叶 [MS MVP]) 在他的报道里早就写过了而且这之前就有人问过.
class T {
…
typedef … iterator // iterator type T
iterator begin(); // first element of the container
iterator end(; // element after last of the container
};
Container C
…
Container::iterator i
for( i = C.begin(); i != C.end(); i++)
// do something with *i
这样子C#目前是不支持范行,不是没有高手,是你问的过时了 qqchen79(知秋一叶 [MS MVP]) 在他的报道里早就写过了而且这之前就有人问过.
qqchen79(知秋一叶 [MS MVP]) 的报道的地址吗?
谢谢了!