Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

gauge.h HEADER union.

Featured Replies

Ok, I'm doing my homework and studying the header (with Arne's improvements), and I see this part below:

#define ELEMENT_INFO											ELEMENT_TYPE_ENUM				element_type;		   	ID								resource_id;				PIXPOINT						position;					PIXPOINT						previous_position;	  	PIXPOINT						ofs;						PGAUGEHDR						gauge_header;		   	struct ELEMENT_HEADER			*previous_element;	  	struct ELEMENT_HEADER			**next_element;		 	PFAILURE_RECORD					failure_systems;			FLAGS							image_flags;				FLAGS							aircraft_special_instrumentation;	FLAGS							reserved;typedef struct ELEMENT_HEADER{		ELEMENT_INFO}ELEMENT_HEADER;#define HEADER union		{								struct						{								ELEMENT_INFO			};							ELEMENT_HEADER header;	}

It seems this HEADER macro is redundant. Any thoughts as to why, or do I need to review my cpp preprocessor tokenization again? =)

I finally understand what MS was doing here. Basically, they were trying to create a new Type within the limits of C.This macro gives them the same functionality as a C++ anonymous union, which isn't available in C.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.