What I'm trying to accomplish is this:
inline const int size() { return 256; }
int main()
{
int arr[size()];
return 0;
}
But Visual Studio gives me an error when initializing arr[size()]:
expression must have a constant value
Is there a way to accomplish what I want without using global variables, Macros, std::vector or creating arr[ ] on heap?