I have a struct Arguments that i use for giving a bunch of variables easily to functions.
struct Arguments
{
vector<Body> boxes[30][30];
}
Boxes is a 2d array, with a vector inside of it i think. I have given the array vectors with different values, but later in my code i want to completly empty the 2d array.
I have tried a few different things, but i am completly new to the c++ language and dont know how i should do it.
void func(Arguments &args)
{
args.boxes = new vector<Body>[30][30];
}
This gives me a compile error that i have incompatible types "error: incompatible types in assignment of 'std::vector*' to 'std::vector [30][30]"
How can i fix this? Any help would be great!