static int i = 5; static int j = i; int main() { return 0; }
I initialize the static variable to another static variable declared before, but also get the variable. Please tell me why this is a mistake.
j i, i. j = i, . C , . . :
j
i
j = i
static int i = 5; static int j; int main() { j=i; return 0; }
, , .
Source: https://habr.com/ru/post/1624665/More articles:Use webpack when including package.json file - javascriptКак вызвать таблицу для изменения значения другого столбца таблицы - sqlWhy is @GenerateMicroBenchmark missing from JMH and what is its replacement? - javaPHP - using pathinfo variables makes relative paths inoperative - phpWhy is there no constructor with parameters restricting common parameters in C #? - c #CakePHP 3: Changing the structure of a result set - phpWhat face and mood should I use in the Gherkin / Specflow Given / When / Then instructions? - bddBeans initialization map using Spring JavaConfig - javaHow to prevent mutation of an object / array - javascriptHow to replace pthread_create during connection - cAll Articles