View ej.cpp
string bytes = "p,T04◘4◘♦64♣£318♦T-"; // Construya este string con los bytes que da la función de mat_to_byte() concatendo cada posición.
char* c_bytes = bytes.c_str();
vector<byte> vec;
for( int i = 0; i < bytes.lenght(); i++) {
vec.push_back( c_bytes[i] );
}
View paridad.cpp
// Conviertan el binario a string así:
int binary_int = 10100110;
std::string bin_str = std::to_string( binary_int );
// cuenten los 1 o 0 no se
int counter = 0;
for( int i = 0; i < bin_str.lenght(); i++ ) {
int _integer = std::stoi( bin_str[0] );
if( _integer == 1 ) { // o 0
counter++;
View lambda.cpp
std::thread t( [this,args...]() {
a.method();
} );
t.detach
View fittest.cpp
void Jigsaw::set_fittest() {
_fittest.clear();
int _first, _second, _third;
_first = _second = _third = INT_MIN;
for( unsigned int i = 0; i < _population.size(); i++ ) {
if( (int)_population[i]._fitness > _first ) {