小编Jes*_*234的帖子

Lots of variables, best approach without nested loops

I’m in need of some help and guidance on the design of my code. I want to run tests with multiple variables set to multiple values, without creating insane amounts of nested loops. I got a struct which holds various variables like this (only three integers as an example, but the real deal will hold a lot more, including booleans, doubles etc):

struct VarHolder
{
    int a;
    int b;
    int c;
    // etc..
    // etc..
};
Run Code Online (Sandbox Code Playgroud)

The struct get passed …

c++ cartesian-product nested-loops

0
推荐指数
1
解决办法
99
查看次数

标签 统计

c++ ×1

cartesian-product ×1

nested-loops ×1