JMK no matter what

파이썬 중독

lang:cpp
vector<int> range(int n)
{   
    vector<int> ret(n);
    for(int i = 0; i < n; ++i)
        ret[i] = i;
    return ret;
}   
2009-10-28 07:42:08 | JM | /journal/ | 2 Comments
Being
2009-10-28 12:35:13
vector<int> x = range(5);
vector<int>::iterator it;
for (it = x.begin();it != x.end();it++) doit();

vs.

int i;
for (i = 0;i < n;i++) doit();

...
JM
2009-10-28 14:57:54
Being/ ... 그건 아니고 index set 을 조작해야 하는 일이 있었음 -_ -;;

Leave a comment