I’m reading “Think in C++” and it just introduced the extern declaration. For example:

extern int x;
extern float y;

I think I understand the meaning (declaration without definition), but I wonder when it proves useful.

Can someone provide an example?

4 s
4

Leave a Reply

Your email address will not be published. Required fields are marked *