21 years, 11 months ago
Highlights
Community contributions featuredQuote:Original post by JingoQuote:Original post by Mayrel int i = 0; std::cout << (++i + ++i + ++i) << std::endl;Did you know that that code actually can validly pri…
21 years, 11 months ago
21 years, 11 months ago
21 years, 11 months ago
Quote:Original post by snk_kidNo you don't have to use reserve & third explicit loop in this case e.g.typedef std::vector< std::vector<int> > foo_vec;for(foo_vec::si…
21 years, 11 months ago
Use reservefor(int x=0;x<(int)cell.size();x++) { for(int y=0;y<(int)cell[x].size();y++) { std::vector<Point> neighbours; neighbours.reserve(8); for(int i=0;i<8;i+…
21 years, 11 months ago
Latest Activity
See all in DiscussionsQuote:Original post by JingoQuote:Original post by Mayrel int i = 0; std::cout << (++i + ++i + ++i) << std::endl;Did …
21 years, 11 months ago
Quote:Original post by snk_kidNo you don't have to use reserve & third explicit loop in this case e.g.typedef std::vector< std::vector<int> …
21 years, 11 months ago
Use reservefor(int x=0;x<(int)cell.size();x++) { for(int y=0;y<(int)cell[x].size();y++) { std::vector<Point> neighbours; neighbours.reserve(8); for(int i=0;i<8;i++) { Point p(x,y); neig
21 years, 11 months ago