Exemplo n.º 1
0
Arquivo: main.cpp Projeto: CCJY/coliru
int main() {
    auto lambda = make_counter();
    auto func = make_counter_f();
    
    std::cout << typeid( lambda ).name() << std::endl;
    std::cout << typeid( func ).name() << std::endl;
}
Exemplo n.º 2
0
void gen_perms(double_string *ds, int qty, int size) {
   counter *c = make_counter(qty, size);
   int i = 0;

   for(;;) {
      double_string *tmp = dup_double_string(ds);
      for(i = 0; i < qty; i++) {
         double v = get_double_string(&tmp, c->values[i]);
         printf("%.2f ", v);
      }
      printf("\n");
      destroy_double_string(tmp);
      if(inc_counter(c)) {
         break;
      }
   }
   free(c);
}