Thread: typedef struct

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2019
    Posts
    97

    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
    Last edited by Salem; 03-31-2020 at 08:58 AM. Reason: removed crayola

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. typedef struct vs struct declaration error in code
    By shaswat in forum C Programming
    Replies: 3
    Last Post: 07-25-2016, 06:45 AM
  2. differences between struct and typedef struct
    By stanlvw in forum C Programming
    Replies: 1
    Last Post: 07-22-2008, 03:28 PM
  3. typedef struct ?
    By audinue in forum C Programming
    Replies: 8
    Last Post: 06-22-2008, 11:55 AM
  4. Typedef and Struct
    By tikelele in forum C Programming
    Replies: 11
    Last Post: 11-14-2007, 11:28 PM
  5. Diff btw typedef struct and struct?
    By willkoh in forum C Programming
    Replies: 3
    Last Post: 09-24-2005, 02:27 PM

Tags for this Thread