Default Data Types

Started by PhilG57, April 17, 2013, 08:06:06 PM

Previous topic - Next topic

PhilG57

I'm playing with some code which contains this structure -
typedef struct xxx {
   unsigned aaa[5];   /* aaa          */
   unsigned bbb;   /* bbb          */
} xxx;


Later the structure is defined (declared????) as follows -

xxx what;
and used as follows -

  what->aaa[0] = 0x12345678;
   what->bbb = 0;


Question1: what data type is "aaa"?
Question2: is "bbb" an int data type?

Thanks (again).

Stefan Pendl

One usually writes unsigned int, but some compilers allow the shorthand of using only unsigned.

For best readability I would always use unsigned int.
---
Stefan

Proud member of the UltraDefrag Development Team