Category : Files from Magazines
Archive   : CUJ9405.ZIP
Filename : SHARE.CPP

 
Output of file : SHARE.CPP contained in archive : CUJ9405.ZIP

LISTING 12 - Shows that tags and variables share the same
namespace
#include

struct pair {int x; int y;};

main()
{
int pair = 0;
pair p = {pair,pair}; // error

cout << pair << endl;
cout << p.x << ',' << p.y << endl;
return 0;
}