#include <stdio.h> register int i = 10; int main(void) { printf( " i = %d \n ", i ); return 0; }
Here I declared the variable i as register. But compiling it showing the following error
" error: register name not specified for ‘i’ "
Why shouldn't we use the register keyword globally?
A registervariable is a type of local variable.This is a hint for storing a value in a register for faster access.A register variable cannot be global or static.It can only be defined in a block.Also, please format the code you publish
register
A register , , . register , , , , . , .
, , , . , , register . , , / .
register . .
, , , , . , , , , , , "" .
, register . register, , ( , ). register , "stack". , static extern.
static
extern
, register , . - promises - .
Source: https://habr.com/ru/post/1783387/More articles:Set CurrentPrincipal to Winforms for all threads - multithreadingIs it possible to save sms in drafts using Android sdk - androidcallback from workerRole when task completed - azureFirefox extension that interacts with existing page content - javascriptdifference between XElement and XDocument - c #How to call a method in another class in Java? - javaExpand env variables in String - javaВозврат значения из хранимого proc в качестве параметра Output vs SELECT - c#Лицензия GPL, LGPL - gplResize RenderedImage - javaAll Articles