I have a problem with the Vector variable and const.
The Vector gives an error “C++ variable is not a type name”
The Vector gives an error “C++ a type qualifier is not allowed on a nonmember function”
Also I have found out that creating the variable inside the function for some reason works.
Would like to just know how to fix the errors. Thanks.
Why are you declaring a function inside another function? It’s not supported. You have to declare a function in .h, or use a lamdba if inside another function.
It doesn’t matter to you if the function is const when you call it. const only affects what’s going on inside that function.
What @3dRaven posted must work. However, make sure you’re calling AddGeneratedVector for the right object.