-
typedef struct
Hi everyone,
I came across with this chunk of code
Code:
struct ble_blink_s {
uint16_t service_handler;
uint8_t service_type;
};
typedef struct ble_blink_s ble_blink_t;
Can I re-write the above code like this?
Code:
typedef struct ble_blink_s {
uint16_t service_handler;
uint8_t service_type;
} ble_blink_t;
Thanks in advance
Nick
-
-
Thanks for your ptompt answer!!
Also, these syntax are equivalent?
Code:
typedef struct{
ble_cus_evt_type_t evt_type;
} ble_cus_evt_t;
Code:
typedef struct ble_cus_evt_t{
ble_cus_evt_type_t evt_type;
};
-
-
Quote:
Originally Posted by
Salem
No..
Could you explain?
-
What's to explain?
The second one just doesn't compile.
-