User profile: JLBorges

User info
User name:JLBorges
History
Joined:
Number of posts:6308
Latest posts:

3 combinations
Brute force: [code]#include <iostream> #include <algorithm> #include <vector> #include <set> std::s...

Bjarne Stroustrup Eg 4.6.4 A text example
[code]#include <iostream> // "iostream" #include <algorithm> // "algorithm" #include <vector> // "ve...

Rounding a double to nearest odd int
[code]#include <iostream> #include <limits> int nearest_odd_integer( double v ) { if( v >= std:...

how to seach on a vector and replace the found element with another vector element
[code]#include <iostream> #include <vector> #include <iterator> #include <algorithm> #include <numer...

Random
We can't really avoid implementation-defined behaviour; for instance, [tt]sizeof(int)[/tt] and the ...