how to declare variable in c++ i dont want to define it so it should not consume any memory just declaration? -
When we write int, the compiler gives memory to int, but now I just want to say to the compiler that the variable integer But
If it is a global variable, use it It will still need to be defined somewhere, if the program uses it. If this is a local variable, you can not declare it without defining it; This will be made when the program will reach the announcement. extract To make it a pure announcement:
extern int a;
Comments
Post a Comment