r/learncpp • u/omen_tenebris • Jun 25 '20
list of c style arrays
Hey. In my code implementation i have something like this
struct MYTABLE
{
int table[NUMBER][NUMBER];
}
where NUMBER is a constant and is decided in compile time with a define.
After some calculations i have a number of results that i'd like to store. These number of results are varied dependent on the size of the matrix (the bigger the NUMBER the more i get).
Is there an solution where i can make something like this:
std::list<MYTABLE> result_set;
result_set later needs to be iterated trough and picked out results that are each others mirrors, rotations etc
Thank you!
1
Upvotes
View all comments
Show parent comment
1
u/omen_tenebris Jun 25 '20
https://github.com/HighbornHellest/ArrayQueen/tree/master/ArrayQueen
the code is a mess... kind of
what i'm looking to solve is in the ArrayQueen.cpp file.
in line 43 you can find my struct, in the Table_stuff namespace
where i want to use the list is inside the solve_for function in line 112.
specifically after line 148 -> out(A); i'd like to store A in a list. A is a result that i've come to and there are many many version of it