I would like to create a pointer to a value in one line; I want the same functionality as this:
int i = MY_VALUE
int * j = &i;
However, I want to do this in one line, and do not want to use two variables. I know that I can do this:
int * i = new int (MY_VALUE);
But I don't want to use dynamic memory; I want to use static memory.
Is there a way that I can allocate a pointer to a value, statically, with one variable, in one line?